From 663f9d449531c78124d99ee68f6a579982da146a Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 12 Feb 2024 23:43:29 +0100 Subject: [PATCH] wayland: Return boolean value handling pointer events We've so far returned FALSE (i.e. PROPAGATE) here, somehow oblivious of the fact that the core event handler would stop all non-gesture events directed to windows. Incorporate this knowledge there, in order to be able to streamline this piece of event handling in core/ code. Part-of: --- src/wayland/meta-wayland-pointer.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index cea0d0735..985349539 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -844,34 +844,33 @@ meta_wayland_pointer_handle_event (MetaWaylandPointer *pointer, { case CLUTTER_MOTION: handle_motion_event (pointer, event); - break; + return pointer->focus_surface ? + CLUTTER_EVENT_STOP : CLUTTER_EVENT_PROPAGATE; case CLUTTER_BUTTON_PRESS: case CLUTTER_BUTTON_RELEASE: handle_button_event (pointer, event); - break; + return pointer->focus_surface ? + CLUTTER_EVENT_STOP : CLUTTER_EVENT_PROPAGATE; case CLUTTER_SCROLL: handle_scroll_event (pointer, event); - break; + return pointer->focus_surface ? + CLUTTER_EVENT_STOP : CLUTTER_EVENT_PROPAGATE; case CLUTTER_TOUCHPAD_SWIPE: meta_wayland_pointer_gesture_swipe_handle_event (pointer, event); - break; + return CLUTTER_EVENT_PROPAGATE; case CLUTTER_TOUCHPAD_PINCH: - meta_wayland_pointer_gesture_pinch_handle_event (pointer, event); - break; + return meta_wayland_pointer_gesture_pinch_handle_event (pointer, event); case CLUTTER_TOUCHPAD_HOLD: - meta_wayland_pointer_gesture_hold_handle_event (pointer, event); - break; + return meta_wayland_pointer_gesture_hold_handle_event (pointer, event); default: - break; + return CLUTTER_EVENT_PROPAGATE; } - - return FALSE; } static void