]> git.sur5r.net Git - i3/i3lock/blobdiff - xcb.c
Bugfix: Correctly error out when unable to grab pointer/keyboard
[i3/i3lock] / xcb.c
diff --git a/xcb.c b/xcb.c
index 032b523bfdf2a4b70fa0ef305badbabbe26ac3ef..f19d5c22fb9eb504e5f3dc058d12e376c7619dd8 100644 (file)
--- a/xcb.c
+++ b/xcb.c
@@ -177,6 +177,6 @@ void grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen) {
         }
     }
 
-    if (tries == 0)
+    if (tries <= 0)
         errx(EXIT_FAILURE, "Cannot grab pointer/keyboard");
 }