| 262 | // instances attached to subwindows are also shut down. |
| 263 | |
| 264 | static void DeleteWindow(Display *dpy, Window win, bool subOnly = false) |
| 265 | { |
| 266 | Window root, parent, *children = NULL; unsigned int n = 0; |
| 267 | |
| 268 | if(!subOnly) WINHASH.remove(dpy, win); |
| 269 | if(XQueryTree(dpy, win, &root, &parent, &children, &n) |
| 270 | && children && n > 0) |
| 271 | { |
| 272 | for(unsigned int i = 0; i < n; i++) DeleteWindow(dpy, children[i]); |
| 273 | _XFree(children); |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | |
| 278 | int XDestroySubwindows(Display *dpy, Window win) |
no test coverage detected