summaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-08-09 00:44:35 +0000
committerDana Jansens <danakj@orodu.net>2002-08-09 00:44:35 +0000
commitbc3268b6f9f86e6aebe0d06ce174b2d603d09c1e (patch)
tree8e7de83d03f3b3501cdc8bc3baac43eb640e0b7f /src/Screen.cc
parent01096f867493aed2efc2694c986811404288c1f1 (diff)
handle toolbars and utility windows proper. also, no more crashes from kpager (i really hope :P), at least not the same way
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 3d51a2d2..d49e418a 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1313,6 +1313,9 @@ void BScreen::manageWindow(Window w) {
// don't list non-normal windows as managed windows
windowList.push_back(win);
updateClientList();
+
+ if (win->isTopmost())
+ specialWindowList.push_back(win->getFrameWindow());
} else if (win->isDesktop()) {
desktopWindowList.push_back(win->getFrameWindow());
}
@@ -1345,6 +1348,17 @@ void BScreen::unmanageWindow(BlackboxWindow *w, bool remap) {
// we don't list non-normal windows as managed windows
windowList.remove(w);
updateClientList();
+
+ if (w->isTopmost()) {
+ WindowList::iterator it = specialWindowList.begin();
+ const WindowList::iterator end = specialWindowList.end();
+ for (; it != end; ++it)
+ if (*it == w->getFrameWindow()) {
+ specialWindowList.erase(it);
+ break;
+ }
+ assert(it != end); // the window wasnt a special window?
+ }
} else if (w->isDesktop()) {
WindowList::iterator it = desktopWindowList.begin();
const WindowList::iterator end = desktopWindowList.end();
@@ -1495,7 +1509,8 @@ void BScreen::raiseWindows(Window *workspace_stack, unsigned int num) {
#endif // XINERAMA
Window *session_stack = new
- Window[(num + workspacesList.size() + rootmenuList.size() + bbwins)];
+ Window[(num + workspacesList.size() + rootmenuList.size() +
+ specialWindowList.size() + bbwins)];
unsigned int i = 0, k = num;
XRaiseWindow(blackbox->getXDisplay(), iconmenu->getWindowID());
@@ -1536,6 +1551,10 @@ void BScreen::raiseWindows(Window *workspace_stack, unsigned int num) {
if (slit->isOnTop())
*(session_stack + i++) = slit->getWindowID();
+ WindowList::iterator sit, send = specialWindowList.end();
+ for (sit = specialWindowList.begin(); sit != send; ++sit)
+ *(session_stack + i++) = *sit;
+
while (k--)
*(session_stack + i++) = *(workspace_stack + k);