diff options
| -rw-r--r-- | x-alt-tab.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/x-alt-tab.c b/x-alt-tab.c index 25976e0..de4cd6e 100644 --- a/x-alt-tab.c +++ b/x-alt-tab.c @@ -4,13 +4,15 @@ int main(int argc, char **argv) { Display *dpy; - if(!(dpy = XOpenDisplay(0x0))) return 1; + if ( (dpy = XOpenDisplay(NULL)) == NULL) + return 1; + if (argc > 1) XCirculateSubwindowsDown(dpy, DefaultRootWindow(dpy)); else XCirculateSubwindowsUp(dpy, DefaultRootWindow(dpy)); - XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); /* nuke focus back to pointer */ + + XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); XSync(dpy, True); return 0; } - |
