From 721c02204a5f00e7f1c59983df0b1549fe1e971b Mon Sep 17 00:00:00 2001 From: markt Date: Sat, 5 Aug 2006 05:21:15 +0000 Subject: a little fix for auto-grouping after restart --- src/Remember.cc | 3 ++- src/Screen.cc | 8 +++----- src/Window.cc | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Remember.cc b/src/Remember.cc index 29336e3..9569b80 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -965,7 +965,8 @@ void Remember::setupFrame(FluxboxWindow &win) { // 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) + Window leftwin = winclient.getGroupLeftWindow(); + if (app->is_grouped && app->group == 0 && leftwin == None) app->group = &win; if (app->focushiddenstate_remember) diff --git a/src/Screen.cc b/src/Screen.cc index 60aed17..22b41dd 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -2073,11 +2073,9 @@ WinClient *BScreen::findGroupRight(WinClient &winclient) { WinClient *other = it->second; m_expecting_groups.erase(it); // don't expect it anymore - // forget about it if it isn't the left-most client in the group, plus - // it must have the atom set on it (i.e. previously encountered by fluxbox) - // for us to check our expecting - if (!winclient.hasGroupLeftWindow() || - other->getGroupLeftWindow() != None) + // forget about it if it isn't the left-most client in the group + Window leftwin = other->getGroupLeftWindow(); + if (leftwin != None && leftwin != winclient.window()) return 0; return other; diff --git a/src/Window.cc b/src/Window.cc index 687f2d4..1895b13 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -386,7 +386,8 @@ void FluxboxWindow::init() { assert(m_client); m_client->setFluxboxWindow(this); - m_client->setGroupLeftWindow(None); // nothing to the left. + if (!m_client->hasGroupLeftWindow()) + m_client->setGroupLeftWindow(None); // nothing to the left. // check for shape extension and whether the window is shaped m_shaped = false; -- cgit v0.11.2