1
0
Fork 0

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3956>
This commit is contained in:
Peter Hutterer 2024-08-19 13:10:00 +10:00 committed by Marge Bot
parent eaa416904d
commit d866590b78

View file

@ -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);