From 65948034ddb352ef1650ceb172316f5bccd81f39 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 21 Dec 2021 21:49:36 +1100 Subject: [PATCH] [client] x11: be more agressive grabbing the pointer --- client/displayservers/X11/x11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 956a2db5..54e47a5f 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -1652,7 +1652,7 @@ static void x11GrabPointer(void) XISetMask(mask.mask, XI_Leave ); Status ret; - for(int retry = 0; retry < 2; ++retry) + for(int retry = 0; retry < 10; ++retry) { ret = XIGrabDevice( x11.display, @@ -1668,7 +1668,7 @@ static void x11GrabPointer(void) // on some WMs (i3) for an unknown reason the first grab attempt when // switching to a desktop that has LG on it fails with GrabFrozen, however // adding as short delay seems to resolve the issue. - if (ret == GrabFrozen && retry == 0) + if (ret == GrabFrozen && retry < 9) { usleep(100000); continue;