summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-11-16 15:26:56 +0100
committerCarlos Garnacho <carlosg@gnome.org>2015-11-17 22:47:20 +0100
commit83b738c0e7060b4526fdbd306fcc255f71c064fa (patch)
tree429a87e6ae3d90f67f9450e249937055689ae205
parent5a022e8e14eca2e7a3675a2270d8fbbee4e08452 (diff)
downloadclutter-83b738c0e7060b4526fdbd306fcc255f71c064fa.tar.gz
evdev: Move additional pointer buttons after the old 4-7 scrolling ones
On X11 those were skipped, so additional pointer buttons would come up as button >= 8 events. Do here the same, so we remain compatible across backends. https://bugzilla.gnome.org/show_bug.cgi?id=758237
-rw-r--r--clutter/evdev/clutter-device-manager-evdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c
index ffb535a81..ac5ea93ad 100644
--- a/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/evdev/clutter-device-manager-evdev.c
@@ -585,11 +585,12 @@ notify_button (ClutterInputDevice *input_device,
break;
default:
- button_nr = button - BTN_MOUSE + 1;
+ /* For compatibility reasons, all additional buttons go after the old 4-7 scroll ones */
+ button_nr = button - (BTN_LEFT - 1) + 4;
break;
}
- if (G_UNLIKELY (button_nr < 1 || button_nr > 8))
+ if (button_nr < 1 || button_nr > 12)
{
g_warning ("Unhandled button event 0x%x", button);
return;