Package: rdesktop
Version: 1.6.0-2
Severity: normal

>From 096a39b35773e8d58358f2176b9b96cc6edfb16d Mon Sep 17 00:00:00 2001
From: David Fries <david.d.fr...@boeing.com>
Date: Wed, 10 Mar 2010 19:00:23 -0600
Subject: [PATCH] skip scroll wheel up event (generates double events)

Unix has a mouse scroll event button press followed by release
for that button number.  For windows just send button press and
skip button release.  If the release is sent, it is treated as
a second scroll action on the windows side.  Tested with Windows XP.

It's easiest to see when scrolling through a combo box, previously it
would skip entries.  Now it doesn't.
---
 xwin.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/xwin.c b/xwin.c
index 1691d00..235b4e8 100644
--- a/xwin.c
+++ b/xwin.c
@@ -2254,6 +2254,16 @@ handle_button_event(XEvent xevent, RD_BOOL down)
                }
        }
 
+       /* Unix has a mouse scroll event button press followed by release
+        * for that button number.  For windows just send button press and
+        * skip button release.  If the release is sent, it is treated as
+        * a second scroll action on the windows side.  Tested with Windows XP.
+        */
+       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,
-- 
1.7.0


-- System Information:
Debian Release: 5.0.2
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.33-rc4 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages rdesktop depends on:
ii  libc6                         2.9-25     GNU C Library: Shared libraries
ii  libssl0.9.8                   0.9.8k-8   SSL shared libraries
ii  libx11-6                      2:1.2.2-1  X11 client-side library

rdesktop recommends no packages.

rdesktop suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to