[clutter/clutter-1.24] Revert "evdev: Move additional pointer buttons after the old 4-7 scrolling ones"



commit 86848072bdbd7ef3fff27675aed9bcc9b5f2177d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Nov 18 13:43:12 2015 +0100

    Revert "evdev: Move additional pointer buttons after the old 4-7 scrolling ones"
    
    This reverts commit 83b738c0e7060b4526fdbd306fcc255f71c064fa.
    
    Given the way Mutter relies on this to get event codes back, we can't change
    this as easily on stable branches. Proper fixes are going to the master
    branches.

 clutter/evdev/clutter-device-manager-evdev.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c
index ac5ea93..ffb535a 100644
--- a/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/evdev/clutter-device-manager-evdev.c
@@ -585,12 +585,11 @@ notify_button (ClutterInputDevice *input_device,
       break;
 
     default:
-      /* For compatibility reasons, all additional buttons go after the old 4-7 scroll ones */
-      button_nr = button - (BTN_LEFT - 1) + 4;
+      button_nr = button - BTN_MOUSE + 1;
       break;
     }
 
-  if (button_nr < 1 || button_nr > 12)
+  if (G_UNLIKELY (button_nr < 1 || button_nr > 8))
     {
       g_warning ("Unhandled button event 0x%x", button);
       return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]