From c7efb68ff1f3db8d648dc0ee31b390d7f1e551ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 13 Sep 2023 14:00:44 +0800 Subject: [PATCH] wayland/pointer: Update cursor surface when current surface changes The cursor surface is decided by the "current" surface; if that alone changed (e.g. current surface was destroyed), we didn't update the cursor, meaning it either got stuck, or got hidden if the client exited completely. Part-of: --- src/wayland/meta-wayland-pointer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index fa7cb667b..71b068299 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -620,6 +620,9 @@ static void meta_wayland_pointer_set_current (MetaWaylandPointer *pointer, MetaWaylandSurface *surface) { + if (pointer->current == surface) + return; + if (pointer->current) { g_clear_signal_handler (&pointer->current_surface_destroyed_handler_id, @@ -635,6 +638,8 @@ meta_wayland_pointer_set_current (MetaWaylandPointer *pointer, G_CALLBACK (current_surface_destroyed), pointer); } + + meta_wayland_pointer_update_cursor_surface (pointer); } static void