From 1fd653dd823e88fede039cc304341263642cec55 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sat, 22 May 2021 16:41:58 +0100 Subject: GHOST/wayland: handle missing relative-pointer and pointer-constraints support --- intern/ghost/intern/GHOST_SystemWayland.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'intern/ghost') 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; } -- cgit v1.2.3