summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Ryazanov <dima@gmail.com>2015-02-04 01:51:57 -0800
committerBryce Harrington <bryce@osg.samsung.com>2015-02-04 19:45:24 -0800
commit3e4d4bdd94f6db154e77df72cc2da366cf72629f (patch)
tree1985ef3122729e1adb45f5a1649674952ce2c50f
parent90d1ac8d491e97b0244aa19ba6fe0d2ac934b720 (diff)
downloadweston-3e4d4bdd94f6db154e77df72cc2da366cf72629f.tar.gz
Fix "Back", "Forward", and other special mouse buttons in the X11 compositor.
They're off by 4 because of the scroll buttons. Signed-off-by: Dima Ryazanov <dima@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/compositor-x11.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 58634461..27922510 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1017,8 +1017,8 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
update_xkb_state_from_core(c, button_event->state);
switch (button_event->detail) {
- default:
- button = button_event->detail + BTN_LEFT - 1;
+ case 1:
+ button = BTN_LEFT;
break;
case 2:
button = BTN_MIDDLE;
@@ -1056,6 +1056,9 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
WL_POINTER_AXIS_HORIZONTAL_SCROLL,
DEFAULT_AXIS_STEP_DISTANCE);
return;
+ default:
+ button = button_event->detail + BTN_SIDE - 8;
+ break;
}
notify_button(&c->core_seat,