all repos — fluxbox @ 222d8cd7e9c0f28b3dd0b9b253a0b096d856195f

custom fork of the fluxbox windowmanager

don't tab transient windows from apps file, and change their layers when the main window does
markt markt
commit

222d8cd7e9c0f28b3dd0b9b253a0b096d856195f

parent

dff2aa33561b00e97b3561892fb690ba9f2968c6

4 files changed, 46 insertions(+), 23 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,9 @@

(Format: Year/Month/Day) Changes for 1.0.0: +*07/06/08: + * Fix transient windows getting tabbed from apps file and not changing layers + when main window is in a lowered tab (Mark) + WinClient.cc Window.cc Remember.cc *07/06/06: * Fix to avoid rogue instances of /bin/sh after forking away programs (Mathias) util/fbrun/FbRun.cc src/FbCommands.cc
M src/Remember.ccsrc/Remember.cc

@@ -1132,8 +1132,10 @@ }

void Remember::setupClient(WinClient &winclient) { - if (winclient.screen().isRestart()) - return; // don't mess up windows on restart + // leave windows alone on restart + // don't apply settings to transient windows + if (winclient.screen().isRestart() || winclient.transientFor()) + return; Application *app = find(winclient); if (app == 0)
M src/WinClient.ccsrc/WinClient.cc

@@ -107,6 +107,11 @@ mem_fun(&WinClient::updateTransientInfo));

// clear transient waiting list for this window s_transient_wait.erase(win); } + + // also check if this window is a transient + // this needs to be done before creating an fbwindow, so this doesn't get + // tabbed using the apps file + updateTransientInfo(); } WinClient::~WinClient() {

@@ -263,13 +268,6 @@ }

} void WinClient::updateTransientInfo() { -#ifdef DEBUG - cerr<<__FUNCTION__<<": m_win = "<<m_win<<endl; -#endif // DEBUG - if (m_win == 0) - return; - - // remove this from parent if (transientFor() != 0) { transientFor()->transientList().remove(this);

@@ -293,7 +291,7 @@ #endif // DEBUG

return; } - if (win != None && m_win->screen().rootWindow() == win) { + if (win != None && screen().rootWindow() == win) { // transient for root window... = transient for group // I don't think we are group-aware yet return;

@@ -334,9 +332,6 @@ if (transientFor() != 0) {

// we need to add ourself to the right client in // the transientFor() window so we search client transient_for->transientList().push_back(this); - - if (transientFor()->fbwindow() && transientFor()->fbwindow()->isStuck()) - m_win->stick(); } }
M src/Window.ccsrc/Window.cc

@@ -424,8 +424,9 @@ /**************************************************/

/* Read state above here, apply state below here. */ /**************************************************/ - // update transient infomation - m_client->updateTransientInfo(); + if (m_client->transientFor() && m_client->transientFor()->fbwindow() && + m_client->transientFor()->fbwindow()->isStuck()) + stick(); // adjust the window decorations based on transience and window sizes if (m_client->isTransient() && !screen().decorateTransient()) {

@@ -1831,6 +1832,19 @@ // notify since some things consider "stuck" to be a pseudo-workspace

m_workspacesig.notify(); } + ClientList::iterator client_it = clientList().begin(); + ClientList::iterator client_it_end = clientList().end(); + for (; client_it != client_it_end; ++client_it) { + + WinClient::TransientList::const_iterator it = (*client_it)->transientList().begin(); + WinClient::TransientList::const_iterator it_end = (*client_it)->transientList().end(); + for (; it != it_end; ++it) { + if ((*it)->fbwindow() && (*it)->fbwindow()->isStuck() != stuck) + (*it)->fbwindow()->stick(); + } + + } + }

@@ -1939,16 +1953,24 @@ // remember number just in case a transient happens to revisit this window

layernum = win->layerItem().getLayerNum(); win->setLayerNum(layernum); - WinClient::TransientList::const_iterator it = client->transientList().begin(); - WinClient::TransientList::const_iterator it_end = client->transientList().end(); - for (; it != it_end; ++it) { - win = (*it)->fbwindow(); - if (win && !win->isIconic()) { - screen().updateNetizenWindowRaise((*it)->window()); - win->layerItem().moveToLayer(layernum); - win->setLayerNum(layernum); + // move all the transients, too + ClientList::iterator client_it = win->clientList().begin(); + ClientList::iterator client_it_end = win->clientList().end(); + for (; client_it != client_it_end; ++client_it) { + + WinClient::TransientList::const_iterator it = (*client_it)->transientList().begin(); + WinClient::TransientList::const_iterator it_end = (*client_it)->transientList().end(); + for (; it != it_end; ++it) { + FluxboxWindow *fbwin = (*it)->fbwindow(); + if (fbwin && !fbwin->isIconic()) { + screen().updateNetizenWindowRaise((*it)->window()); + fbwin->layerItem().moveToLayer(layernum); + fbwin->setLayerNum(layernum); + } } + } + } void FluxboxWindow::setFocusHidden(bool value) {