stackingList.push_front(w);
- // if the window is sticky, then it needs to be added on all other
- // workspaces too!
- if (! sticky && w->isStuck()) {
- for (unsigned int i = 0; i < screen->getWorkspaceCount(); ++i)
- if (i != id)
- screen->getWorkspace(i)->addWindow(w, place, True);
- }
-
if (w->isNormal()) {
if (! sticky) {
w->setWorkspace(id);
focusFallback(w);
}
- // if the window is sticky, then it needs to be removed on all other
- // workspaces too!
- if (! sticky && w->isStuck()) {
- for (unsigned int i = 0; i < screen->getWorkspaceCount(); ++i)
- if (i != id)
- screen->getWorkspace(i)->removeWindow(w, True);
- }
-
if (! w->isNormal()) return;
BlackboxWindowList::iterator it, end = windowList.end();
const BlackboxWindowList::iterator end = stackingList.end();
for (; it != end; ++it) {
BlackboxWindow *bw = *it;
- bw->show();
+ // not normal windows cant focus from mouse enters anyways, so we dont
+ // need to unmap/remap them on workspace changes
+ if (! bw->isStuck() || bw->isNormal())
+ bw->show();
}
}
BlackboxWindow *bw = *it;
++it; // withdraw removes the current item from the list so we need the next
// iterator before that happens
- bw->withdraw();
+ // not normal windows cant focus from mouse enters anyways, so we dont
+ // need to unmap/remap them on workspace changes
+ if (! bw->isStuck() || bw->isNormal())
+ bw->withdraw();
}
}