From 1dd5e0143e6ab63833851f4b3a42c500a9777162 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 4 Aug 2006 21:43:47 +0000 Subject: don't re-apply remembered settings on restart if they are set as window properties --- ChangeLog | 3 +++ src/Remember.cc | 29 +++++++++++++++++------------ src/Screen.cc | 2 +- src/Window.cc | 4 ---- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7459ee..291225a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0rc3: *06/08/04: + * Don't re-apply remembered settings on restart if they are set as window + properties (Mark) + Remember.cc Screen.cc Window.cc * Updated spanish translations (thanks bobbens) nls/es_ES * Updated german translations (thanks tenner) diff --git a/src/Remember.cc b/src/Remember.cc index 2a28dda..3d8db2e 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -962,15 +962,31 @@ void Remember::setupFrame(FluxboxWindow &win) { if (app == 0) return; // nothing to do + // first, set the options that aren't preserved as window properties on + // restart, then return if fluxbox is starting up -- we want restart to + // disturb the current window state as little as possible if (app->is_grouped && app->group == 0) app->group = &win; + if (app->focushiddenstate_remember) + win.setFocusHidden(true); + if (app->iconhiddenstate_remember) + win.setIconHidden(true); + if (app->layer_remember) + win.moveToLayer(app->layer); + if (app->decostate_remember) + win.setDecorationMask(app->decostate); + + // now check if fluxbox is starting up + if (Fluxbox::instance()->isStartup()) + return; + BScreen &screen = winclient.screen(); if (app->workspace_remember) { // we use setWorkspace and not reassoc because we're still initialising win.setWorkspace(app->workspace); - if (app->jumpworkspace_remember && !Fluxbox::instance()->isStartup()) + if (app->jumpworkspace_remember) screen.changeWorkspaceID(app->workspace); } @@ -978,10 +994,6 @@ void Remember::setupFrame(FluxboxWindow &win) { win.screen().setOnHead(win, app->head); } - if (app->decostate_remember) - win.setDecorationMask(app->decostate); - - if (app->dimensions_remember) win.resize(app->w, app->h); @@ -1032,13 +1044,6 @@ void Remember::setupFrame(FluxboxWindow &win) { if (win.isStuck() && !app->stuckstate || !win.isStuck() && app->stuckstate) win.stick(); // toggles - if (app->focushiddenstate_remember) - win.setFocusHidden(true); - if (app->iconhiddenstate_remember) - win.setIconHidden(true); - - if (app->layer_remember) - win.moveToLayer(app->layer); } diff --git a/src/Screen.cc b/src/Screen.cc index 35df59a..60aed17 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1379,7 +1379,7 @@ FluxboxWindow *BScreen::createWindow(Window client) { // and if so, then join it. if ((other = findGroupRight(*winclient)) && other->fbwindow() != win) win->attachClient(*other); - else if (other) + else if (other) // should never happen win->moveClientRightOf(*other, *winclient); m_clientlist_sig.notify(); diff --git a/src/Window.cc b/src/Window.cc index f6c7242..687f2d4 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -627,7 +627,6 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) { WinClient *was_focused = 0; WinClient *focused_win = FocusControl::focusedWindow(); - WinClient *other = m_screen.findGroupLeft(client); // get the current window on the end of our client list Window leftwin = None; if (!clientList().empty()) @@ -691,9 +690,6 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) { client.saveBlackboxAttribs(m_blackbox_attrib); m_clientlist.push_back(&client); - - if (other && other->fbwindow() == this) - moveClientRightOf(client, *other); } // make sure that the state etc etc is updated for the new client -- cgit v0.11.2