From b1f295070ea458b97d65e15d833671c1956bc3fe Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 1 Feb 2014 13:31:53 +0800 Subject: use visibility instead of attr.width, removed cruft --- x-alt-tab.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'x-alt-tab.c') 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; } -- cgit v1.2.3