aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
commit31b47e78147ca20803b123f392bfd2002b70e052 (patch)
treef7beb9baa9daf86d66358fd834cafae14de7c782 /src/Window.cc
parente169d33552c8e7070aa6e13da0187f2013b4cfc3 (diff)
downloadfluxbox-31b47e78147ca20803b123f392bfd2002b70e052.zip
fluxbox-31b47e78147ca20803b123f392bfd2002b70e052.tar.bz2
cleanup of some files
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc31
1 files changed, 10 insertions, 21 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 2f06603..0c5ae0f 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1183,17 +1183,6 @@ void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) {
1183 } 1183 }
1184} 1184}
1185 1185
1186void FluxboxWindow::updateRememberStateFromClient(WinClient &client) {
1187#ifdef REMEMBER
1188 Remember* rem= const_cast<Remember*>(static_cast<const Remember*>(Fluxbox::instance()->getAtomHandler("remember")));
1189 Application* app= 0;
1190 if ( rem && (app= (const_cast<Remember*>(rem))->find(client)) ) {
1191 if ( !m_toggled_decos && rem->isRemembered(client, Remember::REM_DECOSTATE) )
1192 setDecorationMask(app->decostate);
1193 }
1194#endif // REMEMBER
1195}
1196
1197void FluxboxWindow::updateFunctions() { 1186void FluxboxWindow::updateFunctions() {
1198 if (!m_client) 1187 if (!m_client)
1199 return; 1188 return;
@@ -1828,7 +1817,7 @@ void FluxboxWindow::setIconic(bool val) {
1828 1817
1829void FluxboxWindow::raise() { 1818void FluxboxWindow::raise() {
1830 if (isIconic()) 1819 if (isIconic())
1831 return;; 1820 return;
1832#ifdef DEBUG 1821#ifdef DEBUG
1833 cerr<<"FluxboxWindow("<<title()<<")::raise()[layer="<<layerNum()<<"]"<<endl; 1822 cerr<<"FluxboxWindow("<<title()<<")::raise()[layer="<<layerNum()<<"]"<<endl;
1834#endif // DEBUG 1823#endif // DEBUG
@@ -2459,7 +2448,9 @@ void FluxboxWindow::propertyNotifyEvent(WinClient &client, Atom atom) {
2459 } else if (atom == fbatoms->getMWMHintsAtom()) { 2448 } else if (atom == fbatoms->getMWMHintsAtom()) {
2460 client.updateMWMHints(); 2449 client.updateMWMHints();
2461 updateMWMHintsFromClient(client); 2450 updateMWMHintsFromClient(client);
2462 updateRememberStateFromClient(client); 2451 if (!m_toggled_decos) {
2452 Remember::instance().updateDecoStateFromClient(client);
2453 }
2463 applyDecorations(); // update decorations (if they changed) 2454 applyDecorations(); // update decorations (if they changed)
2464 } 2455 }
2465 break; 2456 break;
@@ -2511,21 +2502,19 @@ void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) {
2511 struct timeval now; 2502 struct timeval now;
2512 gettimeofday(&now, NULL); 2503 gettimeofday(&now, NULL);
2513 2504
2505 Remember& rinst = Remember::instance();
2506
2514 if (now.tv_sec > m_creation_time + 1) 2507 if (now.tv_sec > m_creation_time + 1)
2515 m_creation_time = 0; 2508 m_creation_time = 0;
2516 else if (Remember::instance().isRemembered(*client, 2509 else if (rinst.isRemembered(*client, Remember::REM_MAXIMIZEDSTATE) ||
2517 Remember::REM_MAXIMIZEDSTATE) || 2510 rinst.isRemembered(*client, Remember::REM_FULLSCREENSTATE)) {
2518 Remember::instance().isRemembered(*client,
2519 Remember::REM_FULLSCREENSTATE)) {
2520 cr.value_mask = cr.value_mask & ~(CWWidth | CWHeight); 2511 cr.value_mask = cr.value_mask & ~(CWWidth | CWHeight);
2521 cr.value_mask = cr.value_mask & ~(CWX | CWY); 2512 cr.value_mask = cr.value_mask & ~(CWX | CWY);
2522 } else { 2513 } else {
2523 if (Remember::instance().isRemembered(*client, 2514 if (rinst.isRemembered(*client, Remember::REM_DIMENSIONS))
2524 Remember::REM_DIMENSIONS))
2525 cr.value_mask = cr.value_mask & ~(CWWidth | CWHeight); 2515 cr.value_mask = cr.value_mask & ~(CWWidth | CWHeight);
2526 2516
2527 if (Remember::instance().isRemembered(*client, 2517 if (rinst.isRemembered(*client, Remember::REM_POSITION))
2528 Remember::REM_POSITION))
2529 cr.value_mask = cr.value_mask & ~(CWX | CWY); 2518 cr.value_mask = cr.value_mask & ~(CWX | CWY);
2530 } 2519 }
2531 } 2520 }