diff options
| author | Patrick Haller <patrick@haller.ws> | 2012-02-18 14:37:18 +0800 |
|---|---|---|
| committer | Patrick Haller <patrick@haller.ws> | 2012-02-18 14:37:18 +0800 |
| commit | c0f8a57194fbdecc2870de7594edf2e47c557baa (patch) | |
| tree | dea2c08eff25e79184fa025a5c9a175754dbae2a /x-alt-tab.c | |
| parent | 7fa1169cb63c8a795782446863794e5349f019a7 (diff) | |
| parent | a1ef548bfb93e95b62369fc80a352832eff9bf50 (diff) | |
Merge branch 'master' of github.com:patrickhaller/no-wm
Diffstat (limited to 'x-alt-tab.c')
| -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; } - |
