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

This commit is contained in:
Christian Rauch 2021-05-22 16:41:58 +01:00
parent d9aae38bc8
commit 1fd653dd82
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}