From 0a9720a2280a2f1acf7e75dbd817e3f2fe49db05 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 10 Aug 2025 16:59:57 +1000 Subject: [PATCH] Fix #142871: Two cursors visible when panning over a number button Resolve regression in [0] where setting the cursor wasn't checking if a software cursor was used. This would then show the hardware & software cursors. [0]: 232b106e647e9830bfa39514fcbd31b1261fa8a6 --- intern/ghost/intern/GHOST_SystemWayland.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index a6aa6440f8f..7ef5fd13b97 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -8765,8 +8765,10 @@ GHOST_TSuccess GHOST_SystemWayland::cursor_shape_set(const GHOST_TStandardCursor display_->wp.cursor_shape_manager, seat->wl.pointer); } if (seat->cursor.shape.device) { - wp_cursor_shape_device_v1_set_shape( - seat->cursor.shape.device, seat->pointer.serial, *wl_shape); + if (seat->cursor.is_hardware) { + wp_cursor_shape_device_v1_set_shape( + seat->cursor.shape.device, seat->pointer.serial, *wl_shape); + } } /* Set this to make sure we remember which shape we set when unhiding cursors. */ seat->cursor.shape.enum_id = *wl_shape; @@ -8785,8 +8787,10 @@ GHOST_TSuccess GHOST_SystemWayland::cursor_shape_set(const GHOST_TStandardCursor display_->wp.cursor_shape_manager, zwp_tablet_tool_v2); } if (tablet_tool->shape.device) { - wp_cursor_shape_device_v1_set_shape( - tablet_tool->shape.device, tablet_tool->serial, *wl_shape); + if (seat->cursor.is_hardware) { + wp_cursor_shape_device_v1_set_shape( + tablet_tool->shape.device, tablet_tool->serial, *wl_shape); + } } /* Set this to make sure we remember which shape we set when unhiding cursors. */ tablet_tool->shape.enum_id = *wl_shape;