void CaptureAllWindows(void) { int i, j; unsigned int nchildren; Window root, parent, *children; PPosOverride = TRUE; if (!XQueryTree(dpy, Scr.Root, &root, &parent, &children, &nchildren)) return; /* * weed out icon windows */ for (i = 0; i < nchildren; i++) { if (children[i]) { XWMHints *wmhintsp = XGetWMHints(dpy, children[i]); if (wmhintsp) { if (wmhintsp->flags & IconWindowHint) { for (j = 0; j < nchildren; j++) { if (children[j] == wmhintsp->icon_window) { children[j] = None; break; } } } XFree((char *) wmhintsp); } } } /* * map all of the non-override windows */ for (i = 0; i < nchildren; i++) { if (children[i] && MappedNotOverride(children[i])) { XUnmapWindow(dpy, children[i]); Event.xmaprequest.window = children[i]; HandleMapRequestKeepRaised(BlackoutWin); } } isIconicState = DontCareState; if (nchildren > 0) XFree((char *) children); /* after the windows already on the screen are in place, * don't use PPosition */ PPosOverride = FALSE; Scr.flags |= WindowsCaptured; KeepOnTop(); }
/*********************************************************************** * * Procedure: * HandleMapRequest - MapRequest event handler * ************************************************************************/ void HandleMapRequest() { DBUG("HandleMapRequest","Routine Entered"); HandleMapRequestKeepRaised(None); }