aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-18 10:20:53 (GMT)
committerPaul Tagliamonte <paultag@fluxbox.org>2012-04-07 02:11:32 (GMT)
commit54d7ed69720381e0b68c0f25115a9d603195bc9e (patch)
treef18ad4b42745704a1bf79c4e5cc61a9e4b57b1a5 /src
parent8bee090a493ee2243f7787b58cda3f15e7011b2b (diff)
downloadfluxbox_paul-54d7ed69720381e0b68c0f25115a9d603195bc9e.zip
fluxbox_paul-54d7ed69720381e0b68c0f25115a9d603195bc9e.tar.bz2
Attach modifiedSig handlers to the session.screenX.defaultDeco resource
Diffstat (limited to 'src')
-rw-r--r--src/Screen.hh2
-rw-r--r--src/Window.cc13
-rw-r--r--src/Window.hh1
3 files changed, 13 insertions, 3 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index 1057229..2ff87db 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -108,7 +108,7 @@ public:
108 bool getMaxDisableMove() const { return *resource.max_disable_move; } 108 bool getMaxDisableMove() const { return *resource.max_disable_move; }
109 bool getMaxDisableResize() const { return *resource.max_disable_resize; } 109 bool getMaxDisableResize() const { return *resource.max_disable_resize; }
110 bool doShowWindowPos() const { return *resource.show_window_pos; } 110 bool doShowWindowPos() const { return *resource.show_window_pos; }
111 const std::string &defaultDeco() const { return *resource.default_deco; } 111 FbTk::StringResource &defaultDecoResource() { return resource.default_deco; }
112 const std::string windowMenuFilename() const; 112 const std::string windowMenuFilename() const;
113 FbTk::ImageControl &imageControl() { return *m_image_control.get(); } 113 FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
114 // menus 114 // menus
diff --git a/src/Window.cc b/src/Window.cc
index 8d44caa..5b85f82 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -411,13 +411,15 @@ void FluxboxWindow::init() {
411 m_workspace_number = m_screen.currentWorkspaceID(); 411 m_workspace_number = m_screen.currentWorkspaceID();
412 412
413 // set default decorations but don't apply them 413 // set default decorations but don't apply them
414 setDecorationMask(WindowState::getDecoMaskFromString(screen().defaultDeco()), 414 setDecorationMask(WindowState::getDecoMaskFromString(*screen().defaultDecoResource()),
415 false); 415 false);
416 416
417 functions.resize = functions.move = functions.iconify = functions.maximize 417 functions.resize = functions.move = functions.iconify = functions.maximize
418 = functions.close = functions.tabable = true; 418 = functions.close = functions.tabable = true;
419 419
420 updateMWMHintsFromClient(*m_client); 420 updateMWMHintsFromClient(*m_client);
421 join(screen().defaultDecoResource().modifiedSig(),
422 FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::decorationsChanged));
421 423
422 m_timer.setTimeout(*fluxbox.getAutoRaiseDelayResource()); 424 m_timer.setTimeout(*fluxbox.getAutoRaiseDelayResource());
423 join(fluxbox.getAutoRaiseDelayResource().modifiedSig(), FbTk::MemFun(m_timer, 425 join(fluxbox.getAutoRaiseDelayResource().modifiedSig(), FbTk::MemFun(m_timer,
@@ -1100,7 +1102,7 @@ void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) {
1100 } 1102 }
1101 1103
1102 unsigned int mask = decorationMask(); 1104 unsigned int mask = decorationMask();
1103 mask &= WindowState::getDecoMaskFromString(screen().defaultDeco()); 1105 mask &= WindowState::getDecoMaskFromString(*screen().defaultDecoResource());
1104 setDecorationMask(mask, false); 1106 setDecorationMask(mask, false);
1105 1107
1106 // functions.tabable is ours, not special one 1108 // functions.tabable is ours, not special one
@@ -2693,6 +2695,13 @@ void FluxboxWindow::themeReconfigured() {
2693 sendConfigureNotify(); 2695 sendConfigureNotify();
2694} 2696}
2695 2697
2698void FluxboxWindow::decorationsChanged() {
2699 setDecorationMask(WindowState::getDecoMaskFromString(*screen().defaultDecoResource()),
2700 false);
2701 updateMWMHintsFromClient(*m_client);
2702 applyDecorations();
2703}
2704
2696void FluxboxWindow::workspaceAreaChanged(BScreen &screen) { 2705void FluxboxWindow::workspaceAreaChanged(BScreen &screen) {
2697 frame().applyState(); 2706 frame().applyState();
2698} 2707}
diff --git a/src/Window.hh b/src/Window.hh
index 0d2cadd..1b8be18 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -477,6 +477,7 @@ private:
477 void grabButtons(); 477 void grabButtons();
478 478
479 void themeReconfigured(); 479 void themeReconfigured();
480 void decorationsChanged();
480 481
481 /** 482 /**
482 * Calculates insertition position in the list by 483 * Calculates insertition position in the list by