From 77c518f8088dfae042f96f4f6424232e6400de40 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 29 Jul 2002 06:21:31 +0000 Subject: better sticky windows. --- src/Screen.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/Screen.cc') 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(); -- cgit v1.2.3