From 11dcd976f9dd698b981348af4500f8ea9b18a4e2 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Fri, 22 Mar 2013 10:07:14 +0000 Subject: [PATCH] Fixes bug with mouse scroll handling. X mouse scroll events comes as mouse button press and release events. On the windows sider the release is interpreted as an additional scroll down event. Thanks goes to David Fries for this patch. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1699 423420c4-83ab-492f-b58f-81f9feb106b5 --- xwin.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xwin.c b/xwin.c index 3b710fb..297d713 100644 --- a/xwin.c +++ b/xwin.c @@ -2279,6 +2279,14 @@ handle_button_event(XEvent xevent, RD_BOOL down) } } + /* Ignore mouse scroll button release event which will be handled as an additional + * scrolldown event on the Windows side. + */ + if (!down && (button == MOUSE_FLAG_BUTTON4 || button == MOUSE_FLAG_BUTTON5)) + { + return; + } + if (xevent.xmotion.window == g_wnd) { rdp_send_input(time(NULL), RDP_INPUT_MOUSE,