From 86848072bdbd7ef3fff27675aed9bcc9b5f2177d Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 18 Nov 2015 13:43:12 +0100 Subject: 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 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c index ac5ea93ad..ffb535a81 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; -- cgit v1.2.1