X Strike Force X.Org X11 SVN commit: r2124 - in trunk/driver/xserver-xorg-input-mouse/debian: . patches
Author: ender
Date: 2006-05-12 08:10:05 -0400 (Fri, 12 May 2006)
New Revision: 2124
Added:
trunk/driver/xserver-xorg-input-mouse/debian/patches/
trunk/driver/xserver-xorg-input-mouse/debian/patches/01_stolen_fron_HEAD_spurious_mouse_events.diff
trunk/driver/xserver-xorg-input-mouse/debian/patches/series
Modified:
trunk/driver/xserver-xorg-input-mouse/debian/changelog
trunk/driver/xserver-xorg-input-mouse/debian/rules
Log:
* debian/rules: Added support for patches.
* 01_stolen_fron_HEAD_spurious_mouse_events.diff: Added patch for mouse.c
from CVS in order to fix fast scrolling and wrong events. Closes: #366787.
Modified: trunk/driver/xserver-xorg-input-mouse/debian/changelog
===================================================================
--- trunk/driver/xserver-xorg-input-mouse/debian/changelog 2006-05-12 11:00:53 UTC (rev 2123)
+++ trunk/driver/xserver-xorg-input-mouse/debian/changelog 2006-05-12 12:10:05 UTC (rev 2124)
@@ -1,3 +1,11 @@
+xserver-xorg-input-mouse (1:1.0.4-3) unstable; urgency=low
+
+ * debian/rules: Added support for patches.
+ * 01_stolen_fron_HEAD_spurious_mouse_events.diff: Added patch for mouse.c
+ from CVS in order to fix fast scrolling and wrong events. Closes: #366787.
+
+ -- David Martínez Moreno <ender@debian.org> Fri, 12 May 2006 14:07:21 +0200
+
xserver-xorg-input-mouse (1:1.0.4-2) unstable; urgency=low
* Upload to modular
Added: trunk/driver/xserver-xorg-input-mouse/debian/patches/01_stolen_fron_HEAD_spurious_mouse_events.diff
===================================================================
--- trunk/driver/xserver-xorg-input-mouse/debian/patches/01_stolen_fron_HEAD_spurious_mouse_events.diff 2006-05-12 11:00:53 UTC (rev 2123)
+++ trunk/driver/xserver-xorg-input-mouse/debian/patches/01_stolen_fron_HEAD_spurious_mouse_events.diff 2006-05-12 12:10:05 UTC (rev 2124)
@@ -0,0 +1,113 @@
+Patch from Alan Hourihane grabbed from CVS:
+http://webcvs.freedesktop.org/xorg/driver/xf86-input-mouse/src/mouse.c?r1=1.27&r2=1.28
+
+(MousePostEvent):
+ Overhaul of wheel processing. Does work correctly with multibit
+ zaxis events now.
+
+Index: src/mouse.c
+===================================================================
+--- src/mouse.c.orig 2006-05-12 14:02:32.465634116 +0200
++++ src/mouse.c 2006-05-12 14:02:40.558186716 +0200
+@@ -2323,7 +2323,7 @@
+ int dx, int dy, int dz, int dw)
+ {
+ MouseDevPtr pMse;
+- int zbutton = 0;
++ int zbutton = 0, wbutton = 0, zbuttoncount = 0, wbuttoncount = 0;
+ int i, b, buttons = 0;
+
+ pMse = pInfo->private;
+@@ -2344,6 +2344,7 @@
+ /* XXX Could this go in the conversion_proc? */
+ switch (pMse->negativeZ) {
+ case MSE_NOZMAP: /* do nothing */
++ dz = 0;
+ break;
+ case MSE_MAPTOX:
+ if (dz != 0) {
+@@ -2358,20 +2359,46 @@
+ }
+ break;
+ default: /* buttons */
+- buttons &= ~(pMse->negativeZ | pMse->positiveZ
+- | pMse->negativeW | pMse->positiveW);
+- if (dw < 0 || dz < -1)
+- zbutton = pMse->negativeW;
+- else if (dz < 0)
++ buttons &= ~(pMse->negativeZ | pMse->positiveZ);
++ if (dz < 0) {
+ zbutton = pMse->negativeZ;
+- else if (dw > 0 || dz > 1)
+- zbutton = pMse->positiveW;
+- else if (dz > 0)
++ zbuttoncount = -dz;
++ } else if (dz > 0) {
+ zbutton = pMse->positiveZ;
+- buttons |= zbutton;
++ zbuttoncount = dz;
++ }
+ dz = 0;
+ break;
+ }
++ switch (pMse->negativeW) {
++ case MSE_NOZMAP: /* do nothing */
++ dw = 0;
++ break;
++ case MSE_MAPTOX:
++ if (dw != 0) {
++ dx = dw;
++ dw = 0;
++ }
++ break;
++ case MSE_MAPTOY:
++ if (dw != 0) {
++ dy = dw;
++ dw = 0;
++ }
++ break;
++ default: /* buttons */
++ buttons &= ~(pMse->negativeW | pMse->positiveW);
++ if (dw < 0) {
++ wbutton = pMse->negativeW;
++ wbuttoncount = -dw;
++ } else if (dw > 0) {
++ wbutton = pMse->positiveW;
++ wbuttoncount = dw;
++ }
++ dw = 0;
++ break;
++ }
++
+
+ /* Apply angle offset */
+ if (pMse->angleOffset != 0) {
+@@ -2388,16 +2415,19 @@
+ dx = dy;
+ dy = tmp;
+ }
+- MouseDoPostEvent(pInfo, buttons, dx, dy);
+
+- /*
+- * If dz has been mapped to a button `down' event, we need to cook up
+- * a corresponding button `up' event.
+- */
+- if (zbutton) {
+- buttons &= ~zbutton;
+- MouseDoPostEvent(pInfo, buttons, 0, 0);
+- }
++ /* If mouse wheel movement has to be mapped on a button, we need to
++ * loop for button press and release events. */
++ do {
++ MouseDoPostEvent(pInfo, buttons | zbutton | wbutton, dx, dy);
++ dx = dy = 0;
++ if (zbutton || wbutton)
++ MouseDoPostEvent(pInfo, buttons, 0, 0);
++ if (--zbuttoncount <= 0)
++ zbutton = 0;
++ if (--wbuttoncount <= 0)
++ wbutton = 0;
++ } while (zbutton || wbutton);
+
+ pMse->lastButtons = truebuttons;
+ }
Added: trunk/driver/xserver-xorg-input-mouse/debian/patches/series
===================================================================
--- trunk/driver/xserver-xorg-input-mouse/debian/patches/series 2006-05-12 11:00:53 UTC (rev 2123)
+++ trunk/driver/xserver-xorg-input-mouse/debian/patches/series 2006-05-12 12:10:05 UTC (rev 2124)
@@ -0,0 +1 @@
+01_stolen_fron_HEAD_spurious_mouse_events.diff -p0
Modified: trunk/driver/xserver-xorg-input-mouse/debian/rules
===================================================================
--- trunk/driver/xserver-xorg-input-mouse/debian/rules 2006-05-12 11:00:53 UTC (rev 2123)
+++ trunk/driver/xserver-xorg-input-mouse/debian/rules 2006-05-12 12:10:05 UTC (rev 2124)
@@ -31,7 +31,7 @@
# kbd_drv.a isn't phenomenally useful; kbd_drv.so more so
confflags += --disable-static
-build: build-stamp
+build: patch build-stamp
build-stamp:
dh_testdir
@@ -44,7 +44,7 @@
touch build-stamp
-clean:
+clean: xsfclean
dh_testdir
dh_testroot
rm -f build-stamp
Reply to: