void wHideInspectorForWindow(WWindow *wwin) { WWindow *pwin = wwin->inspector->frame; wWindowUnmap(pwin); pwin->flags.hidden = 1; wClientSetState(pwin, IconicState, None); }
void wUnhideInspectorForWindow(WWindow *wwin) { WWindow *pwin = wwin->inspector->frame; pwin->flags.hidden = 0; pwin->flags.mapped = 1; XMapWindow(dpy, pwin->client_win); XMapWindow(dpy, pwin->frame->core->window); wClientSetState(pwin, NormalState, None); }
/* *----------------------------------------------------------------------- * manageAllWindows-- * Manages all windows in the screen. * * Notes: * Called when the wm is being started. * No events can be processed while the windows are being * reparented/managed. *----------------------------------------------------------------------- */ static void manageAllWindows(WScreen * scr, int crashRecovery) { Window root, parent; Window *children; unsigned int nchildren; unsigned int i, j; WWindow *wwin; XGrabServer(dpy); XQueryTree(dpy, scr->root_win, &root, &parent, &children, &nchildren); scr->flags.startup = 1; /* first remove all icon windows */ for (i = 0; i < nchildren; i++) { XWMHints *wmhints; if (children[i] == None) continue; wmhints = XGetWMHints(dpy, children[i]); if (wmhints && (wmhints->flags & IconWindowHint)) { for (j = 0; j < nchildren; j++) { if (children[j] == wmhints->icon_window) { XFree(wmhints); wmhints = NULL; children[j] = None; break; } } } if (wmhints) { XFree(wmhints); } } for (i = 0; i < nchildren; i++) { if (children[i] == None) continue; wwin = wManageWindow(scr, children[i]); if (wwin) { /* apply states got from WSavedState */ /* shaded + minimized is not restored correctly */ if (wwin->flags.shaded) { wwin->flags.shaded = 0; wShadeWindow(wwin); } if (wwin->flags.miniaturized && (wwin->transient_for == None || wwin->transient_for == scr->root_win || !windowInList(wwin->transient_for, children, nchildren))) { wwin->flags.skip_next_animation = 1; wwin->flags.miniaturized = 0; wIconifyWindow(wwin); } else { wClientSetState(wwin, NormalState, None); } if (crashRecovery) { int border; border = (!HAS_BORDER(wwin) ? 0 : scr->frame_border_width); wWindowMove(wwin, wwin->frame_x - border, wwin->frame_y - border - (wwin->frame->titlebar ? wwin->frame->titlebar->height : 0)); } } } XUngrabServer(dpy); /* hide apps */ wwin = scr->focused_window; while (wwin) { if (wwin->flags.hidden) { WApplication *wapp = wApplicationOf(wwin->main_window); if (wapp) { wwin->flags.hidden = 0; wHideApplication(wapp); } else { wwin->flags.hidden = 0; } } wwin = wwin->prev; } XFree(children); scr->flags.startup = 0; scr->flags.startup2 = 1; while (XPending(dpy)) { XEvent ev; WMNextEvent(dpy, &ev); WMHandleEvent(&ev); } w_global.workspace.last_used = 0; wWorkspaceForceChange(scr, 0); if (!wPreferences.flags.noclip) wDockShowIcons(w_global.workspace.array[w_global.workspace.current]->clip); scr->flags.startup2 = 0; }