wayland: Bail early if cursor shape doesn't change

No need to call meta_wayland_pointer_update_cursor_surface in that case.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4361>
This commit is contained in:
Michel Dänzer 2025-03-25 16:15:03 +01:00 committed by Bruce Leidl
parent 5141ad2acb
commit 62d10da4cb

View File

@ -1234,6 +1234,10 @@ meta_wayland_pointer_set_cursor_shape (MetaWaylandPointer *pointer,
g_clear_signal_handler (&pointer->cursor_surface_destroy_id,
pointer->cursor_surface);
}
else if (pointer->cursor_shape == shape)
{
return;
}
pointer->cursor_surface = NULL;
pointer->cursor_shape = shape;