diff options
author | Christian Rauch <Rauch.Christian@gmx.de> | 2021-05-22 18:41:58 +0300 |
---|---|---|
committer | Christian Rauch <Rauch.Christian@gmx.de> | 2021-06-03 20:18:27 +0300 |
commit | 1fd653dd823e88fede039cc304341263642cec55 (patch) | |
tree | 051710682e8626d1883fd31eb3f44c0849d0ccc2 | |
parent | d9aae38bc8377f4cb99a1fbd2d92e367fcfceac6 (diff) |
GHOST/wayland: handle missing relative-pointer and pointer-constraints support
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |