From 3528b54378b60fdb7692dcd849c61dccfeeb805f Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 27 Jan 2024 14:11:42 +0100 Subject: [PATCH] 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: --- src/backends/native/meta-seat-impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/native/meta-seat-impl.c b/src/backends/native/meta-seat-impl.c index f46a7b640..78055efbe 100644 --- a/src/backends/native/meta-seat-impl.c +++ b/src/backends/native/meta-seat-impl.c @@ -822,12 +822,12 @@ meta_seat_impl_notify_button_in_impl (MetaSeatImpl *seat_impl, button_nr = CLUTTER_BUTTON_PRIMARY; break; - case BTN_RIGHT: + case BTN_MIDDLE: case BTN_STYLUS: button_nr = CLUTTER_BUTTON_MIDDLE; break; - case BTN_MIDDLE: + case BTN_RIGHT: case BTN_STYLUS2: button_nr = CLUTTER_BUTTON_SECONDARY; break;