diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-07-27 18:17:45 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-07-27 18:17:45 +0000 |
| commit | 5ec63388b8fbbdffc0999ba727ad718f87d683fc (patch) | |
| tree | b63d1899ade9ca828edf76038837f643c15cb2c6 /src/Window.cc | |
| parent | 3816b6a25701983efc92dcadb04937006e4506cf (diff) | |
fixes to make sticky windows work better. they appear in all workspace lists, they get focus when switching workspaces properly, their workspace menus show their focus properly.
Diffstat (limited to 'src/Window.cc')
| -rw-r--r-- | src/Window.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/Window.cc b/src/Window.cc index 1662484a..2d183749 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1963,6 +1963,10 @@ void BlackboxWindow::stick(void) { blackbox_attrib.flags ^= AttribOmnipresent; blackbox_attrib.attrib ^= AttribOmnipresent; + for (unsigned int i = 0; i < screen->getNumberOfWorkspaces(); ++i) + if (i != blackbox_attrib.workspace) + screen->getWorkspace(i)->removeWindow(this, True); + flags.stuck = False; if (! flags.iconic) @@ -1972,11 +1976,6 @@ void BlackboxWindow::stick(void) { xatom->setValue(client.window, XAtom::net_wm_desktop, XAtom::cardinal, blackbox_attrib.workspace); - for (unsigned int i = 0; i < screen->getNumberOfWorkspaces(); ++i) - if (i != blackbox_attrib.workspace) - if (screen->getWorkspace(i)->getLastFocusedWindow() == this) - screen->getWorkspace(i)->focusFallback(this); - setState(current_state); } else { flags.stuck = True; @@ -1988,6 +1987,10 @@ void BlackboxWindow::stick(void) { // value than that contained in the class' data. xatom->setValue(client.window, XAtom::net_wm_desktop, XAtom::cardinal, 0xffffffff); + + for (unsigned int i = 0; i < screen->getNumberOfWorkspaces(); ++i) + if (i != blackbox_attrib.workspace) + screen->getWorkspace(i)->addWindow(this, False, True); setState(current_state); } @@ -2102,9 +2105,11 @@ void BlackboxWindow::setFocusFlag(bool focus) { if (! flags.iconic) { // iconic windows arent in a workspace menu! - Clientmenu *menu = - screen->getWorkspace(blackbox_attrib.workspace)->getMenu(); - menu->setItemSelected(window_number, isFocused()); + if (flags.stuck) + screen->getCurrentWorkspace()->setFocused(this, isFocused()); + else + screen->getWorkspace(blackbox_attrib.workspace)-> + setFocused(this, flags.focused); } } |
