properly lower windows and keep desktop windows on the bottom.
This commit is contained in:
parent
043e42a316
commit
8cb1108f4e
3 changed files with 22 additions and 11 deletions
|
@ -1380,13 +1380,27 @@ void BScreen::raiseWindows(Window *workspace_stack, unsigned int num) {
|
|||
}
|
||||
|
||||
|
||||
void BScreen::lowerDesktops(void) {
|
||||
if (desktopWindowList.empty()) return;
|
||||
void BScreen::lowerWindows(Window *workspace_stack, unsigned int num) {
|
||||
assert(num > 0); // this would cause trouble in the XRaiseWindow call
|
||||
|
||||
XLowerWindow(blackbox->getXDisplay(), desktopWindowList[0]);
|
||||
if (desktopWindowList.size() > 1)
|
||||
XRestackWindows(blackbox->getXDisplay(), &desktopWindowList[0],
|
||||
desktopWindowList.size());
|
||||
Window *session_stack = new Window[(num + desktopWindowList.size())];
|
||||
unsigned int i = 0, k = num;
|
||||
|
||||
XLowerWindow(blackbox->getXDisplay(), workspace_stack[0]);
|
||||
|
||||
while (k--)
|
||||
*(session_stack + i++) = *(workspace_stack + k);
|
||||
|
||||
WindowList::iterator dit = desktopWindowList.begin();
|
||||
const WindowList::iterator d_end = desktopWindowList.end();
|
||||
for (; dit != d_end; ++dit)
|
||||
*(session_stack + i++) = *dit;
|
||||
|
||||
XRestackWindows(blackbox->getXDisplay(), session_stack, i);
|
||||
|
||||
delete [] session_stack;
|
||||
|
||||
updateStackingList();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ public:
|
|||
void manageWindow(Window w);
|
||||
void unmanageWindow(BlackboxWindow *w, bool remap);
|
||||
void raiseWindows(Window *workspace_stack, unsigned int num);
|
||||
void lowerDesktops(void);
|
||||
void lowerWindows(Window *workspace_stack, unsigned int num);
|
||||
void reassociateWindow(BlackboxWindow *w, unsigned int wkspc_id,
|
||||
bool ignore_sticky);
|
||||
void propagateWindowName(const BlackboxWindow *bw);
|
||||
|
|
|
@ -322,10 +322,7 @@ void Workspace::lowerWindow(BlackboxWindow *w) {
|
|||
wkspc->stackingList.push_back(win);
|
||||
}
|
||||
|
||||
XLowerWindow(screen->getBaseDisplay()->getXDisplay(), stack_vector.front());
|
||||
XRestackWindows(screen->getBaseDisplay()->getXDisplay(),
|
||||
&stack_vector[0], stack_vector.size());
|
||||
screen->lowerDesktops();
|
||||
screen->lowerWindows(&stack_vector[0], stack_vector.size());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue