diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-18 10:20:53 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2013-02-18 21:04:23 (GMT) |
commit | 7a53811fa7b42cf9751ace862dd712d29690da84 (patch) | |
tree | 1b9515087db3bee142e3e89c3cfe60ba4fb2deae | |
parent | 11002f957345c28af3b982b342e32c03a4b6498f (diff) | |
download | fluxbox_pavel-7a53811fa7b42cf9751ace862dd712d29690da84.zip fluxbox_pavel-7a53811fa7b42cf9751ace862dd712d29690da84.tar.bz2 |
Attach modifiedSig handlers to the session.screenX.defaultDeco resource
-rw-r--r-- | src/Screen.hh | 2 | ||||
-rw-r--r-- | src/Window.cc | 13 | ||||
-rw-r--r-- | src/Window.hh | 1 |
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 2ceb3d9..81d5059 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -423,13 +423,15 @@ void FluxboxWindow::init() { | |||
423 | m_workspace_number = m_screen.currentWorkspaceID(); | 423 | m_workspace_number = m_screen.currentWorkspaceID(); |
424 | 424 | ||
425 | // set default decorations but don't apply them | 425 | // set default decorations but don't apply them |
426 | setDecorationMask(WindowState::getDecoMaskFromString(screen().defaultDeco()), | 426 | setDecorationMask(WindowState::getDecoMaskFromString(*screen().defaultDecoResource()), |
427 | false); | 427 | false); |
428 | 428 | ||
429 | functions.resize = functions.move = functions.iconify = functions.maximize | 429 | functions.resize = functions.move = functions.iconify = functions.maximize |
430 | = functions.close = functions.tabable = true; | 430 | = functions.close = functions.tabable = true; |
431 | 431 | ||
432 | updateMWMHintsFromClient(*m_client); | 432 | updateMWMHintsFromClient(*m_client); |
433 | join(screen().defaultDecoResource().modifiedSig(), | ||
434 | FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::decorationsChanged)); | ||
433 | 435 | ||
434 | autoRaiseDelayChanged(*fluxbox.getAutoRaiseDelayResource()); | 436 | autoRaiseDelayChanged(*fluxbox.getAutoRaiseDelayResource()); |
435 | join(fluxbox.getAutoRaiseDelayResource().modifiedSig(), FbTk::MemFun(*this, | 437 | join(fluxbox.getAutoRaiseDelayResource().modifiedSig(), FbTk::MemFun(*this, |
@@ -1110,7 +1112,7 @@ void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) { | |||
1110 | } | 1112 | } |
1111 | 1113 | ||
1112 | unsigned int mask = decorationMask(); | 1114 | unsigned int mask = decorationMask(); |
1113 | mask &= WindowState::getDecoMaskFromString(screen().defaultDeco()); | 1115 | mask &= WindowState::getDecoMaskFromString(*screen().defaultDecoResource()); |
1114 | setDecorationMask(mask, false); | 1116 | setDecorationMask(mask, false); |
1115 | 1117 | ||
1116 | // functions.tabable is ours, not special one | 1118 | // functions.tabable is ours, not special one |
@@ -2660,6 +2662,13 @@ void FluxboxWindow::themeReconfigured() { | |||
2660 | sendConfigureNotify(); | 2662 | sendConfigureNotify(); |
2661 | } | 2663 | } |
2662 | 2664 | ||
2665 | void FluxboxWindow::decorationsChanged() { | ||
2666 | setDecorationMask(WindowState::getDecoMaskFromString(*screen().defaultDecoResource()), | ||
2667 | false); | ||
2668 | updateMWMHintsFromClient(*m_client); | ||
2669 | applyDecorations(); | ||
2670 | } | ||
2671 | |||
2663 | void FluxboxWindow::workspaceAreaChanged(BScreen &screen) { | 2672 | void FluxboxWindow::workspaceAreaChanged(BScreen &screen) { |
2664 | frame().applyState(); | 2673 | frame().applyState(); |
2665 | } | 2674 | } |
diff --git a/src/Window.hh b/src/Window.hh index bdcf4cd..4e4f681 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 |