backends/native: Fix clutter button number assignment to pointer evcodes

Commit 947c636275 meant to swap BTN_STYLUS* buttons, not BTN_MIDDLE/RIGHT
as used by pointing devices. This was also missed during review.

Fixes: 947c636275 ("backends/native: Swap BTN_STYLUS and BTN_STYLUS2")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3550>
This commit is contained in:
Carlos Garnacho 2024-01-27 14:11:42 +01:00
parent a26d08d3bc
commit 3528b54378

View File

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