summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick <phaller@localhost.localdomain>2014-02-01 13:31:53 +0800
committerPatrick <phaller@localhost.localdomain>2014-02-01 13:31:53 +0800
commitb1f295070ea458b97d65e15d833671c1956bc3fe (patch)
tree09507c801cba797f8f7c02992cc95f0e2e01f37b
parent2e3dfb711f7818ca9f9fbdd4dbca792bb32df83d (diff)
use visibility instead of attr.width, removed cruft
-rw-r--r--x-alt-tab.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/x-alt-tab.c b/x-alt-tab.c
index 9987a3c..2d61036 100644
--- a/x-alt-tab.c
+++ b/x-alt-tab.c
@@ -22,8 +22,6 @@ int main(int argc, char **argv)
do {
Window root, parent, *wins, *w;
- XTextProperty name;
- XClassHint hint;
if (argc > 1)
XCirculateSubwindowsDown(dpy, DefaultRootWindow(dpy));
@@ -34,11 +32,9 @@ int main(int argc, char **argv)
XSync(dpy, True);
XQueryTree(dpy, DefaultRootWindow(dpy), &root, &parent, &wins, &nwins);
w = wins + nwins - 1;
- XGetClassHint(dpy, *w, &hint);
- XGetWMName(dpy, *w, &name);
XGetWindowAttributes(dpy, *w, &attr);
count++;
- } while (attr.width <= 1 && count <= nwins+1);
+ } while (attr.map_state != IsViewable && count <= nwins+1);
return 0;
}