[Bf-blender-cvs] [78b13ab3db7] master: Fix T102048: Tablet cursor remains hidden under KDE/Wayland

Campbell Barton noreply at git.blender.org
Tue Oct 25 13:30:39 CEST 2022


Commit: 78b13ab3db70cca977585e29407445d2d1502fbf
Author: Campbell Barton
Date:   Tue Oct 25 22:27:12 2022 +1100
Branches: master
https://developer.blender.org/rB78b13ab3db70cca977585e29407445d2d1502fbf

Fix T102048: Tablet cursor remains hidden under KDE/Wayland

===================================================================

M	intern/ghost/intern/GHOST_SystemWayland.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index f09678374fa..23f7c5060c0 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -139,6 +139,13 @@ static bool use_gnome_confine_hack = false;
  */
 #define USE_GNOME_KEYBOARD_SUPPRESS_WARNING
 
+/**
+ * KDE (plasma 5.26.1) has a bug where the cursor surface needs to be committed
+ * (via `wl_surface_commit`) when it was hidden and is being set to visible again, see: T102048.
+ * TODO: report this bug up-stream.
+ */
+#define USE_KDE_TABLET_HIDDEN_CURSOR_HACK
+
 /**
  * When GNOME is found, require `libdecor`.
  * This is a hack because it seems there is no way to check if the compositor supports
@@ -5297,6 +5304,9 @@ static void cursor_buffer_show(const GWL_Seat *seat)
                                     tablet_tool->wl_surface_cursor,
                                     hotspot_x,
                                     hotspot_y);
+#ifdef USE_KDE_TABLET_HIDDEN_CURSOR_HACK
+      wl_surface_commit(tablet_tool->wl_surface_cursor);
+#endif
     }
   }
 }



More information about the Bf-blender-cvs mailing list