chiark / gitweb /
xtrlock.c: Comment the keyboard/pointer_mode arguments
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 11 Jul 2016 14:07:33 +0000 (15:07 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 11 Jul 2016 14:17:59 +0000 (15:17 +0100)
This makes the calls slightly less confusing.

Also get the indentation right.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
xtrlock.c

index 6117c6f..20208dd 100644 (file)
--- a/xtrlock.c
+++ b/xtrlock.c
@@ -190,7 +190,9 @@ int main(int argc, char **argv){
   
   gs=0; /*gs==grab successful*/
   for (tvt=0 ; tvt<100; tvt++) {
-    ret = XGrabKeyboard(display,window,False,GrabModeAsync,GrabModeAsync,
+    ret = XGrabKeyboard(display,window,False,
+                       GrabModeAsync, /* pointer_mode */
+                       GrabModeAsync, /* keyboard_mode */
                        CurrentTime);
     if (ret == GrabSuccess) {
       gs=1;
@@ -208,7 +210,9 @@ int main(int argc, char **argv){
   }
 
   if (XGrabPointer(display,window,False,(KeyPressMask|KeyReleaseMask)&0,
-               GrabModeAsync,GrabModeAsync,None,
+                  GrabModeAsync, /* pointer_mode */
+                  GrabModeAsync, /* pointer_mode */
+                  None,
                cursor,CurrentTime)!=GrabSuccess) {
     XUngrabKeyboard(display,CurrentTime);
     fprintf(stderr,"xtrlock (version %s): cannot grab pointer\n",