[client] wayland: avoid protocol error when warping in capture mode

When using locked pointer (i.e. capture mode), it doesn't make sense to
warp the cursor, so we disable it. This fixes #540.
This commit is contained in:
Quantum 2021-05-21 22:39:08 -04:00 committed by Geoffrey McRae
parent fd531bd39b
commit 9db3cd7b51

View File

@ -422,7 +422,7 @@ void waylandUngrabKeyboard(void)
void waylandWarpPointer(int x, int y, bool exiting)
{
if (!wlWm.pointerInSurface)
if (!wlWm.pointerInSurface || wlWm.lockedPointer)
return;
if (x < 0) x = 0;