From d866590b78114e44bc75c36d9cc1674e9549fd84 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 19 Aug 2024 13:10:00 +1000 Subject: [PATCH] wayland: Set current tool surface to NULL on prox-out If an application is maximised, clutter_stage_pick_and_update_device() goes into the if ((flags & CLUTTER_DEVICE_UPDATE_IGNORE_CACHE) == 0) condition and returns the current actor for the device. This means no CLUTTER_LEAVE/ENTER events are generated and in turn means the focus is never invalidated and updated. This leads to tool->focus_surface always being NULL and all events are discarded. Notably, tool->current is set to the right surface but that one never changes either so meta_wayland_tablet_tool_set_current_surface() exits early too because surface == tool->current and we thus never call meta_wayland_input_invalidate_focus(). Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3616 Fixes: fb8ac5dff7 ("wayland: Track current tablet tool focus surface") Part-of: --- src/wayland/meta-wayland-tablet-tool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c index 91dae2a03..dbafff724 100644 --- a/src/wayland/meta-wayland-tablet-tool.c +++ b/src/wayland/meta-wayland-tablet-tool.c @@ -919,6 +919,7 @@ meta_wayland_tablet_tool_update (MetaWaylandTabletTool *tool, break; case CLUTTER_PROXIMITY_OUT: tool->current_tablet = NULL; + meta_wayland_tablet_tool_set_current_surface (tool, NULL); meta_wayland_tablet_tool_set_cursor_surface (tool, NULL); meta_wayland_tablet_tool_update_cursor_surface (tool); g_clear_object (&tool->cursor_renderer);