diff --git a/src/Screen.cc b/src/Screen.cc index eb81f0ca..beb64d71 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -921,10 +921,7 @@ void BScreen::LoadStyle(void) { void BScreen::addIcon(BlackboxWindow *w) { if (! w) return; - // we set the workspace to 'all workspaces' so that taskbars will show the - // window. otherwise, it made uniconifying a window impoosible without the - // blackbox workspace menu - w->setWorkspace(0xffffffff); + w->setWorkspace(BSENTINEL); w->setWindowNumber(iconList.size()); iconList.push_back(w); diff --git a/src/Window.cc b/src/Window.cc index 808315dc..99c68fa7 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1867,6 +1867,14 @@ void BlackboxWindow::remaximize(void) { void BlackboxWindow::setWorkspace(unsigned int n) { blackbox_attrib.flags |= AttribWorkspace; blackbox_attrib.workspace = n; + if (n == BSENTINEL) { // iconified window + /* + we set the workspace to 'all workspaces' so that taskbars will show the + window. otherwise, it made uniconifying a window imposible without the + blackbox workspace menu + */ + n = 0xffffffff; + } xatom->setValue(client.window, XAtom::net_wm_desktop, XAtom::cardinal, n); }