+ // Remove the modality so that its parent won't try to re-focus the window
+ if (w->isModal()) w->setModal(False);
+
+ if (w->getWorkspaceNumber() != BSENTINEL &&
+ w->getWindowNumber() != BSENTINEL)
+ getWorkspace(w->getWorkspaceNumber())->removeWindow(w);
+ else if (w->isIconic())
+ removeIcon(w);
+