summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-11-18 13:43:12 +0100
committerCarlos Garnacho <carlosg@gnome.org>2015-11-18 13:45:40 +0100
commit86848072bdbd7ef3fff27675aed9bcc9b5f2177d (patch)
tree536076e4e108bb5072a4942db609fbee944a798d
parent83b738c0e7060b4526fdbd306fcc255f71c064fa (diff)
downloadclutter-86848072bdbd7ef3fff27675aed9bcc9b5f2177d.tar.gz
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.
-rw-r--r--clutter/evdev/clutter-device-manager-evdev.c5
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 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;