[Bf-blender-cvs] [1fd653dd823] master: GHOST/wayland: handle missing relative-pointer and pointer-constraints support

Christian Rauch noreply at git.blender.org
Thu Jun 3 19:24:16 CEST 2021


Commit: 1fd653dd823e88fede039cc304341263642cec55
Author: Christian Rauch
Date:   Sat May 22 16:41:58 2021 +0100
Branches: master
https://developer.blender.org/rB1fd653dd823e88fede039cc304341263642cec55

GHOST/wayland: handle missing relative-pointer and pointer-constraints support

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

M	intern/ghost/intern/GHOST_SystemWayland.cpp

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

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 97a2f7501a3..f1d867da884 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -1739,6 +1739,11 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorVisibility(bool visible)
 GHOST_TSuccess GHOST_SystemWayland::setCursorGrab(const GHOST_TGrabCursorMode mode,
                                                   wl_surface *surface)
 {
+  /* ignore, if the required protocols are not supported */
+  if (!d->relative_pointer_manager || !d->pointer_constraints) {
+    return GHOST_kFailure;
+  }
+
   if (d->inputs.empty()) {
     return GHOST_kFailure;
   }



More information about the Bf-blender-cvs mailing list