rdesktop-1.7.1 mouse wheel double event issue

Dennis Yurichev <[email protected]> Sun, 16 Dec 2012 22:42:04 +0200
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
Hi.

At least 1.7.1 sending two MOUSE_FLAG_BUTTON4/MOUSE_FLAG_BUTTON5
events instead of one when user rotate mouse wheel.
This resulting in very long scrools on RDP server side.
Here is a patch solving this problem.

--- xwin.c.orig 2012-12-16 21:48:09.221542614 +0200
+++ xwin.c  2012-12-16 21:59:05.751140066 +0200
@@ -2214,6 +2214,10 @@
    if (down)
                flags = MOUSE_FLAG_DOWN;
                 
                 +    /* do not send second mouse wheel event */
                 +    if (down && ((button & MOUSE_FLAG_BUTTON4) || (button & MOUSE_FLAG_BUTTON5)))
                 +        return;
                 +
                    /* Stop moving window when button is released, regardless of cursor position */
                        if (g_moving_wnd && (xevent.type == ButtonRelease))
                                    g_moving_wnd = False;


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d