]> git.sur5r.net Git - i3/i3lock/commitdiff
Bugfix: Correctly error out when unable to grab pointer/keyboard
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 20 Jul 2010 18:52:58 +0000 (20:52 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 20 Jul 2010 18:52:58 +0000 (20:52 +0200)
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");
 }