- commit
- 8ef7bbb997fd535ec669cd815d2a0a8de5746ebe
- parent
- f031601c34d721c0395965cbeed18e006add1c57
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2019-10-13 07:44
rm scan
Diffstat
| M | xiwm.c | 46 | ---------------------------------------------- |
1 files changed, 0 insertions, 46 deletions
diff --git a/xiwm.c b/xiwm.c
@@ -192,24 +192,6 @@ configure(Client *c) 192 192 XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent *)&ce); 193 193 } 194 194195 -1 long196 -1 getstate(Window w)197 -1 {198 -1 int format;199 -1 long result = -1;200 -1 unsigned char *p = NULL;201 -1 unsigned long n, extra;202 -1 Atom real;203 -1204 -1 if (XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState],205 -1 &real, &format, &n, &extra, (unsigned char **)&p) != Success)206 -1 return -1;207 -1 if (n != 0)208 -1 result = *p;209 -1 XFree(p);210 -1 return result;211 -1 }212 -1213 195 Client * 214 196 wintoclient(Window w) 215 197 { @@ -971,33 +953,6 @@ setup(void) 971 953 } 972 954 973 955 void974 -1 scan(void)975 -1 {976 -1 unsigned int i, num;977 -1 Window d1, d2, *wins = NULL;978 -1 XWindowAttributes wa;979 -1980 -1 if (XQueryTree(dpy, root, &d1, &d2, &wins, &num)) {981 -1 for (i = 0; i < num; i++) {982 -1 if (!XGetWindowAttributes(dpy, wins[i], &wa)983 -1 || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))984 -1 continue;985 -1 if (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)986 -1 manage(wins[i], &wa);987 -1 }988 -1 for (i = 0; i < num; i++) { /* now the transients */989 -1 if (!XGetWindowAttributes(dpy, wins[i], &wa))990 -1 continue;991 -1 if (XGetTransientForHint(dpy, wins[i], &d1)992 -1 && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState))993 -1 manage(wins[i], &wa);994 -1 }995 -1 if (wins)996 -1 XFree(wins);997 -1 }998 -1 }999 -11000 -1 void1001 956 runAutostart(void) { 1002 957 system("~/.config/xiwm/autostart.sh"); 1003 958 } @@ -1032,7 +987,6 @@ main(int argc, char *argv[]) 1032 987 if (!(dpy = XOpenDisplay(NULL))) 1033 988 die("xiwm: cannot open display"); 1034 989 setup();1035 -1 scan();1036 990 runAutostart(); 1037 991 run(); 1038 992 cleanup();