[Pkg-sdl-commits] [libsdl2] 01/05: Apply patch accepted upstream to work around a false-positive in the X11 mouse wheel code (Closes: #723797). Thanks Darren Salt for the report and the fix.

Manuel A. Fernandez Montecelo mafm at alioth.debian.org
Sun Oct 20 00:05:49 UTC 2013


This is an automated email from the git hooks/post-receive script.

mafm pushed a commit to branch master
in repository libsdl2.

commit a4eeaa29ac172e77be5377d02a2adc91cd3ff78e
Author: Manuel A. Fernandez Montecelo <mafm at debian.org>
Date:   Sat Oct 19 19:21:10 2013 +0100

    Apply patch accepted upstream to work around a false-positive in the X11 mouse wheel code (Closes: #723797).
    Thanks Darren Salt for the report and the fix.
---
 debian/changelog                                   |    3 +
 ...23797-false_positives_in_mouse_wheel_code.patch |   61 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 3 files changed, 65 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 73779dc..989ad88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
 libsdl2 (2.0.0+dfsg1-3) UNRELEASED; urgency=low
 
   * Build-Depends on pkg-config
+  * Apply patch accepted upstream to work around a false-positive in the
+    X11 mouse wheel code (Closes: #723797).  Thanks Darren Salt for the
+    report and the fix.
 
  -- Manuel A. Fernandez Montecelo <mafm at debian.org>  Fri, 18 Oct 2013 22:00:37 +0100
 
diff --git a/debian/patches/bug-723797-false_positives_in_mouse_wheel_code.patch b/debian/patches/bug-723797-false_positives_in_mouse_wheel_code.patch
new file mode 100644
index 0000000..621b790
--- /dev/null
+++ b/debian/patches/bug-723797-false_positives_in_mouse_wheel_code.patch
@@ -0,0 +1,61 @@
+Description: Work around a false-positive in the X11 mouse wheel code
+ .
+ This false positive occurs when one particular button on my mouse is
+ pressed. The kernel which I'm using is patched to cause a release event to
+ be synthesised immediately when the mouse says that this button is pressed
+ because the mouse doesn't signal release until the button is next pressed.
+ .
+ (Also documents a false negative, observed with the horizontal scroll wheel
+ on the same mouse.)
+Author: Darren Salt <devspam at moreofthesa.me.uk>
+Last-Update: 2013-10-19
+Bug-Debian: http://bugs.debian.org/723797
+Forwarded: http://bugzilla.libsdl.org/show_bug.cgi?id=2110
+Applied-Upstream: http://hg.libsdl.org/SDL/rev/6073ad385c9b
+
+# HG changeset patch
+# User Sam Lantinga <slouken at libsdl.org>
+# Date 1380350117 25200
+# Node ID 6073ad385c9bd68834950c556b4e643f4fad638e
+# Parent  3c9889bf26269988c8ea7bee3154d2cd3b7875ae
+# User Darren Salt <devspam at moreofthesa.me.uk>
+# Date 1379621782 -3600
+#      Thu Sep 19 21:16:22 2013 +0100
+Work around a false-positive in the X11 mouse wheel code
+
+This false positive occurs when one particular button on my mouse is
+pressed. The kernel which I'm using is patched to cause a release event to
+be synthesised immediately when the mouse says that this button is pressed
+because the mouse doesn't signal release until the button is next pressed.
+
+(Also documents a false negative, observed with the horizontal scroll wheel
+on the same mouse.)
+
+diff -r 3c9889bf2626 -r 6073ad385c9b src/video/x11/SDL_x11events.c
+--- a/src/video/x11/SDL_x11events.c	Fri Sep 27 23:29:05 2013 -0700
++++ b/src/video/x11/SDL_x11events.c	Fri Sep 27 23:35:17 2013 -0700
+@@ -135,7 +135,9 @@
+     XPointer arg)
+ {
+     XEvent *event = (XEvent *) arg;
++    /* we only handle buttons 4 and 5 - false positive avoidance */
+     if (chkev->type == ButtonRelease &&
++        (event->xbutton.button == Button4 || event->xbutton.button == Button5) &&
+         chkev->xbutton.button == event->xbutton.button &&
+         chkev->xbutton.time == event->xbutton.time)
+         return True;
+@@ -150,7 +152,12 @@
+            however, mouse wheel events trigger a button press and a button release
+            immediately. thus, checking if the same button was released at the same
+            time as it was pressed, should be an adequate hack to derive a mouse
+-           wheel event. */
++           wheel event.
++           However, there is broken and unusual hardware out there...
++           - False positive: a button for which a release event is
++             generated (or synthesised) immediately.
++           - False negative: a wheel which, when rolled, doesn't have
++             a release event generated immediately. */
+         if (XCheckIfEvent(display, &relevent, X11_IsWheelCheckIfEvent,
+             (XPointer) event)) {
+ 
+
diff --git a/debian/patches/series b/debian/patches/series
index a2ee0d8..d79ae11 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@
 ####310_fixmouseclicks
 ####320_disappearingcursor.diff
 fix_joystick_misc_axes.diff
+bug-723797-false_positives_in_mouse_wheel_code.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sdl/packages/libsdl2.git



More information about the pkg-sdl-commits mailing list