don't tab transient windows from apps file, and change their layers when the main window does
This commit is contained in:
parent
dff2aa3356
commit
222d8cd7e9
4 changed files with 46 additions and 23 deletions
|
@ -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
|
||||
|
|
|
@ -1132,8 +1132,10 @@ void Remember::setupFrame(FluxboxWindow &win) {
|
|||
|
||||
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)
|
||||
|
|
|
@ -107,6 +107,11 @@ WinClient::WinClient(Window win, BScreen &screen, FluxboxWindow *fbwin):FbTk::Fb
|
|||
// 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::updateWMClassHint() {
|
|||
}
|
||||
|
||||
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 @@ void WinClient::updateTransientInfo() {
|
|||
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 @@ void WinClient::updateTransientInfo() {
|
|||
// 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -424,8 +424,9 @@ void FluxboxWindow::init() {
|
|||
/* 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 @@ void FluxboxWindow::stick() {
|
|||
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 @@ void FluxboxWindow::moveToLayer(int layernum, bool force) {
|
|||
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) {
|
||||
|
|
Loading…
Reference in a new issue