aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Remember.cc6
-rw-r--r--src/WinClient.cc17
-rw-r--r--src/Window.cc42
3 files changed, 42 insertions, 23 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index 6f86ade..1ee60d7 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -1132,8 +1132,10 @@ void Remember::setupFrame(FluxboxWindow &win) {
1132 1132
1133void Remember::setupClient(WinClient &winclient) { 1133void Remember::setupClient(WinClient &winclient) {
1134 1134
1135 if (winclient.screen().isRestart()) 1135 // leave windows alone on restart
1136 return; // don't mess up windows on restart 1136 // don't apply settings to transient windows
1137 if (winclient.screen().isRestart() || winclient.transientFor())
1138 return;
1137 1139
1138 Application *app = find(winclient); 1140 Application *app = find(winclient);
1139 if (app == 0) 1141 if (app == 0)
diff --git a/src/WinClient.cc b/src/WinClient.cc
index da4810d..ab9d967 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -104,6 +104,11 @@ WinClient::WinClient(Window win, BScreen &screen, FluxboxWindow *fbwin):
104 // clear transient waiting list for this window 104 // clear transient waiting list for this window
105 s_transient_wait.erase(win); 105 s_transient_wait.erase(win);
106 } 106 }
107
108 // also check if this window is a transient
109 // this needs to be done before creating an fbwindow, so this doesn't get
110 // tabbed using the apps file
111 updateTransientInfo();
107} 112}
108 113
109WinClient::~WinClient() { 114WinClient::~WinClient() {
@@ -263,13 +268,6 @@ void WinClient::updateWMClassHint() {
263} 268}
264 269
265void WinClient::updateTransientInfo() { 270void WinClient::updateTransientInfo() {
266#ifdef DEBUG
267 cerr<<__FUNCTION__<<": fbwindow() = "<<fbwindow()<<endl;
268#endif // DEBUG
269 if (fbwindow() == 0)
270 return;
271
272
273 // remove this from parent 271 // remove this from parent
274 if (transientFor() != 0) { 272 if (transientFor() != 0) {
275 transientFor()->transientList().remove(this); 273 transientFor()->transientList().remove(this);
@@ -293,7 +291,7 @@ void WinClient::updateTransientInfo() {
293 return; 291 return;
294 } 292 }
295 293
296 if (win != None && fbwindow()->screen().rootWindow() == win) { 294 if (win != None && screen().rootWindow() == win) {
297 // transient for root window... = transient for group 295 // transient for root window... = transient for group
298 // I don't think we are group-aware yet 296 // I don't think we are group-aware yet
299 return; 297 return;
@@ -334,9 +332,6 @@ void WinClient::updateTransientInfo() {
334 // we need to add ourself to the right client in 332 // we need to add ourself to the right client in
335 // the transientFor() window so we search client 333 // the transientFor() window so we search client
336 transient_for->transientList().push_back(this); 334 transient_for->transientList().push_back(this);
337
338 if (transientFor()->fbwindow() && transientFor()->fbwindow()->isStuck())
339 fbwindow()->stick();
340 } 335 }
341 336
342} 337}
diff --git a/src/Window.cc b/src/Window.cc
index b50ee38..44fd4c9 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -432,8 +432,9 @@ void FluxboxWindow::init() {
432 /* Read state above here, apply state below here. */ 432 /* Read state above here, apply state below here. */
433 /**************************************************/ 433 /**************************************************/
434 434
435 // update transient infomation 435 if (m_client->transientFor() && m_client->transientFor()->fbwindow() &&
436 m_client->updateTransientInfo(); 436 m_client->transientFor()->fbwindow()->isStuck())
437 stick();
437 438
438 // adjust the window decorations based on transience and window sizes 439 // adjust the window decorations based on transience and window sizes
439 if (m_client->isTransient() && !screen().decorateTransient()) { 440 if (m_client->isTransient() && !screen().decorateTransient()) {
@@ -1855,6 +1856,19 @@ void FluxboxWindow::stick() {
1855 m_workspacesig.notify(); 1856 m_workspacesig.notify();
1856 } 1857 }
1857 1858
1859 ClientList::iterator client_it = clientList().begin();
1860 ClientList::iterator client_it_end = clientList().end();
1861 for (; client_it != client_it_end; ++client_it) {
1862
1863 WinClient::TransientList::const_iterator it = (*client_it)->transientList().begin();
1864 WinClient::TransientList::const_iterator it_end = (*client_it)->transientList().end();
1865 for (; it != it_end; ++it) {
1866 if ((*it)->fbwindow() && (*it)->fbwindow()->isStuck() != stuck)
1867 (*it)->fbwindow()->stick();
1868 }
1869
1870 }
1871
1858} 1872}
1859 1873
1860 1874
@@ -1955,16 +1969,24 @@ void FluxboxWindow::moveToLayer(int layernum, bool force) {
1955 layernum = win->layerItem().getLayerNum(); 1969 layernum = win->layerItem().getLayerNum();
1956 win->setLayerNum(layernum); 1970 win->setLayerNum(layernum);
1957 1971
1958 WinClient::TransientList::const_iterator it = client->transientList().begin(); 1972 // move all the transients, too
1959 WinClient::TransientList::const_iterator it_end = client->transientList().end(); 1973 ClientList::iterator client_it = win->clientList().begin();
1960 for (; it != it_end; ++it) { 1974 ClientList::iterator client_it_end = win->clientList().end();
1961 win = (*it)->fbwindow(); 1975 for (; client_it != client_it_end; ++client_it) {
1962 if (win && !win->isIconic()) { 1976
1963 screen().updateNetizenWindowRaise((*it)->window()); 1977 WinClient::TransientList::const_iterator it = (*client_it)->transientList().begin();
1964 win->layerItem().moveToLayer(layernum); 1978 WinClient::TransientList::const_iterator it_end = (*client_it)->transientList().end();
1965 win->setLayerNum(layernum); 1979 for (; it != it_end; ++it) {
1980 FluxboxWindow *fbwin = (*it)->fbwindow();
1981 if (fbwin && !fbwin->isIconic()) {
1982 screen().updateNetizenWindowRaise((*it)->window());
1983 fbwin->layerItem().moveToLayer(layernum);
1984 fbwin->setLayerNum(layernum);
1985 }
1966 } 1986 }
1987
1967 } 1988 }
1989
1968} 1990}
1969 1991
1970void FluxboxWindow::setFocusHidden(bool value) { 1992void FluxboxWindow::setFocusHidden(bool value) {