[PATCH synaptics 05/12] When scrolling, hardcode the button/press release cycle.

Peter Hutterer peter.hutterer at who-t.net
Thu May 6 21:41:57 PDT 2010


Not sure why the values for !hw->up and hw->up were used here instead, but this
could potentially lead to unreleased buttons. Also, it's harder to read and
generally confusing, since the same wasn't used for left/right scrolling.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/synaptics.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index 9720acd..3ce7a30 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2262,12 +2262,12 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState *hw)
      */
     if (inside_active_area) {
         while (scroll.up-- > 0) {
-		xf86PostButtonEvent(local->dev, FALSE, 4, !hw->up, 0, 0);
-		xf86PostButtonEvent(local->dev, FALSE, 4, hw->up, 0, 0);
+		xf86PostButtonEvent(local->dev, FALSE, 4, TRUE, 0, 0);
+		xf86PostButtonEvent(local->dev, FALSE, 4, FALSE, 0, 0);
         }
         while (scroll.down-- > 0) {
-		xf86PostButtonEvent(local->dev, FALSE, 5, !hw->down, 0, 0);
-		xf86PostButtonEvent(local->dev, FALSE, 5, hw->down, 0, 0);
+		xf86PostButtonEvent(local->dev, FALSE, 5, TRUE, 0, 0);
+		xf86PostButtonEvent(local->dev, FALSE, 5, FALSE, 0, 0);
         }
         while (scroll.left-- > 0) {
 		xf86PostButtonEvent(local->dev, FALSE, 6, TRUE, 0, 0);
-- 
1.6.6.1



More information about the xorg-devel mailing list