diff options
| author | Patrick Haller <patrick_haller@ofs.edu.sg> | 2011-11-09 11:05:01 +0800 |
|---|---|---|
| committer | Patrick Haller <patrick_haller@ofs.edu.sg> | 2011-11-09 11:05:01 +0800 |
| commit | d8237405dd8cecd3f8f313131e8c214b123b2948 (patch) | |
| tree | 7dea72dd574018b75c988931e42e3a27864b6128 | |
| parent | d1774b8dfb91a7e996f4418fc26a18b5277b1e22 (diff) | |
style cleanup
| -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; } - |
