equal
deleted
inserted
replaced
1244 } |
1244 } |
1245 |
1245 |
1246 void |
1246 void |
1247 scan(void) { |
1247 scan(void) { |
1248 unsigned int i, num; |
1248 unsigned int i, num; |
1249 Window *wins, d1, d2; |
1249 Window d1, d2, *wins = NULL; |
1250 XWindowAttributes wa; |
1250 XWindowAttributes wa; |
1251 |
1251 |
1252 wins = NULL; |
|
1253 if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) { |
1252 if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) { |
1254 for(i = 0; i < num; i++) { |
1253 for(i = 0; i < num; i++) { |
1255 if(!XGetWindowAttributes(dpy, wins[i], &wa) |
1254 if(!XGetWindowAttributes(dpy, wins[i], &wa) |
1256 || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1)) |
1255 || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1)) |
1257 continue; |
1256 continue; |
1263 continue; |
1262 continue; |
1264 if(XGetTransientForHint(dpy, wins[i], &d1) |
1263 if(XGetTransientForHint(dpy, wins[i], &d1) |
1265 && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)) |
1264 && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)) |
1266 manage(wins[i], &wa); |
1265 manage(wins[i], &wa); |
1267 } |
1266 } |
1268 } |
1267 if(wins) |
1269 if(wins) |
1268 XFree(wins); |
1270 XFree(wins); |
1269 } |
1271 } |
1270 } |
1272 |
1271 |
1273 void |
1272 void |
1274 setclientstate(Client *c, long state) { |
1273 setclientstate(Client *c, long state) { |
1275 long data[] = {state, None}; |
1274 long data[] = {state, None}; |