X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FScreen.cc;h=eee7db1085692b2e9fd7b2f458ca85cb5ae33d73;hb=28594da6de001f1d8b6b975286032302db3a6491;hp=86d425d7be868c906705320edb3a61f365cb2982;hpb=4c03637fd1cd5273a030abe38dfffa65c67fd420;p=chaz%2Fopenbox diff --git a/src/Screen.cc b/src/Screen.cc index 86d425d7..eee7db10 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -537,6 +537,13 @@ void BScreen::saveAllowScrollLock(bool a) { } +void BScreen::saveWorkspaceWarping(bool w) { + resource.workspace_warping = w; + config->setValue(screenstr + "workspaceWarping", + resource.workspace_warping); +} + + void BScreen::save_rc(void) { saveSloppyFocus(resource.sloppy_focus); saveAutoRaise(resource.auto_raise); @@ -564,6 +571,7 @@ void BScreen::save_rc(void) { savePlaceIgnoreShaded(resource.ignore_shaded); savePlaceIgnoreMaximized(resource.ignore_maximized); saveAllowScrollLock(resource.allow_scroll_lock); + saveWorkspaceWarping(resource.workspace_warping); toolbar->save_rc(); slit->save_rc(); @@ -699,9 +707,13 @@ void BScreen::load_rc(void) { resource.ignore_maximized)) resource.ignore_maximized = true; - if (! config->getValue(screenstr + "disableBindingsWithScrollLock", - resource.allow_scroll_lock)) - resource.allow_scroll_lock = false; +if (! config->getValue(screenstr + "disableBindingsWithScrollLock", + resource.allow_scroll_lock)) + resource.allow_scroll_lock = false; + + if (! config->getValue(screenstr + "workspaceWarping", + resource.workspace_warping)) + resource.workspace_warping = false; } @@ -1245,6 +1257,15 @@ void BScreen::manageWindow(Window w) { void BScreen::unmanageWindow(BlackboxWindow *w, bool remap) { w->restore(remap); + // Remove the modality so that its parent won't try to re-focus the window + if (w->isModal()) w->setModal(False); + + if (w->getWorkspaceNumber() != BSENTINEL && + w->getWindowNumber() != BSENTINEL) + getWorkspace(w->getWorkspaceNumber())->removeWindow(w); + else if (w->isIconic()) + removeIcon(w); + if (w->isNormal()) { // we don't list non-normal windows as managed windows windowList.remove(w); @@ -1260,6 +1281,9 @@ void BScreen::unmanageWindow(BlackboxWindow *w, bool remap) { assert(it != end); // the window wasnt a desktop window? } + if (blackbox->getFocusedWindow() == w) + blackbox->setFocusedWindow((BlackboxWindow *) 0); + removeNetizen(w->getClientWindow()); /*