summaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-07-29 06:21:31 +0000
committerDana Jansens <danakj@orodu.net>2002-07-29 06:21:31 +0000
commit77c518f8088dfae042f96f4f6424232e6400de40 (patch)
tree7b09e9a2d8aa0a1afca03bbf9c1c2952a7d6b44c /src/Screen.cc
parentf61a455ec1704d305d8643b8215c8e0647f4c869 (diff)
better sticky windows.
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 3cb6176b..d11894ce 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1269,9 +1269,14 @@ void BScreen::unmanageWindow(BlackboxWindow *w, bool remap) {
if (w->isModal()) w->setModal(False);
if (w->getWorkspaceNumber() != BSENTINEL &&
- w->getWindowNumber() != BSENTINEL)
+ w->getWindowNumber() != BSENTINEL) {
getWorkspace(w->getWorkspaceNumber())->removeWindow(w);
- else if (w->isIconic())
+ if (w->isStuck()) {
+ for (unsigned int i = 0; i < getNumberOfWorkspaces(); ++i)
+ if (i != w->getWorkspaceNumber())
+ getWorkspace(i)->removeWindow(w, True);
+ }
+ } else if (w->isIconic())
removeIcon(w);
if (w->isNormal()) {
@@ -1515,6 +1520,10 @@ void BScreen::reassociateWindow(BlackboxWindow *w, unsigned int wkspc_id,
if (w->isIconic()) {
removeIcon(w);
getWorkspace(wkspc_id)->addWindow(w);
+ if (w->isStuck())
+ for (unsigned int i = 0; i < getNumberOfWorkspaces(); ++i)
+ if (i != w->getWorkspaceNumber())
+ getWorkspace(i)->addWindow(w, True);
} else if (ignore_sticky || ! w->isStuck()) {
if (w->isStuck())
w->stick();