1
0
Fork 0

backends/native: Swap BTN_STYLUS and BTN_STYLUS2

BTN_STYLUS is the lower one and traditionally (read: in X) maps to
middle button (2), BTN_STYLUS2 is the upper one and traditionally maps
to right button (3).

This is also what GTK does and our desktop actions too map MIDDLE to
BTN_STYLUS and RIGHT to BTN_STYLUS2.

See also gtk!6168

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3541>
This commit is contained in:
Peter Hutterer 2024-01-24 14:24:02 +10:00 committed by Marge Bot
parent d92c89ca23
commit 947c636275

View file

@ -824,12 +824,12 @@ meta_seat_impl_notify_button_in_impl (MetaSeatImpl *seat_impl,
case BTN_RIGHT: case BTN_RIGHT:
case BTN_STYLUS: case BTN_STYLUS:
button_nr = CLUTTER_BUTTON_SECONDARY; button_nr = CLUTTER_BUTTON_MIDDLE;
break; break;
case BTN_MIDDLE: case BTN_MIDDLE:
case BTN_STYLUS2: case BTN_STYLUS2:
button_nr = CLUTTER_BUTTON_MIDDLE; button_nr = CLUTTER_BUTTON_SECONDARY;
break; break;
case BTN_STYLUS3: case BTN_STYLUS3: