From 62d10da4cb14ea72f9a76540521df58428c80243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 25 Mar 2025 16:15:03 +0100 Subject: [PATCH] wayland: Bail early if cursor shape doesn't change No need to call meta_wayland_pointer_update_cursor_surface in that case. Part-of: --- src/wayland/meta-wayland-pointer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index b7819fdf1..f8218669d 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -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;