From 4c4c0b847dccbe421ea8d848eb367c961d7e8539 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 28 Feb 2024 14:52:25 +0100 Subject: [PATCH] wayland: Do not claim tablet tool events as consumed without focus If the tablet tool has no focus, it should let events go through. Part-of: --- src/wayland/meta-wayland-tablet-tool.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c index 60b82e97a..440a1dd20 100644 --- a/src/wayland/meta-wayland-tablet-tool.c +++ b/src/wayland/meta-wayland-tablet-tool.c @@ -792,9 +792,7 @@ static void handle_motion_event (MetaWaylandTabletTool *tool, const ClutterEvent *event) { - if (!tool->focus_surface) - return; - + g_assert (tool->focus_surface); broadcast_motion (tool, event); broadcast_axes (tool, event); broadcast_frame (tool, event); @@ -807,8 +805,7 @@ handle_button_event (MetaWaylandTabletTool *tool, ClutterEventType event_type; int button; - if (!tool->focus_surface) - return; + g_assert (tool->focus_surface); event_type = clutter_event_type (event); button = clutter_event_get_button (event); @@ -869,6 +866,9 @@ gboolean meta_wayland_tablet_tool_handle_event (MetaWaylandTabletTool *tool, const ClutterEvent *event) { + if (!tool->focus_surface) + return CLUTTER_EVENT_PROPAGATE; + switch (clutter_event_type (event)) { case CLUTTER_PROXIMITY_IN: