From 87fa1eaf5724a90a1a623302884c55cb6a3f474d Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 20 Jul 2011 14:18:59 +0200 Subject: Attach modifiedSig handlers to the session.screenX.tabs.intitlebar resource --- src/FbWinFrame.cc | 4 ++-- src/Screen.cc | 2 +- src/Screen.hh | 2 +- src/Window.cc | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 53cecf7..04e7944 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -100,7 +100,7 @@ FbWinFrame::FbWinFrame(BScreen &screen, unsigned int client_depth, m_use_handle(true), m_visible(false), m_button_pm(0), - m_tabmode(screen.getDefaultInternalTabs()?INTERNAL:EXTERNAL), + m_tabmode(*screen.getDefaultInternalTabsResource()?INTERNAL:EXTERNAL), m_active_orig_client_bw(0), m_need_render(true), m_button_size(1), @@ -1464,7 +1464,7 @@ void FbWinFrame::applyDecorations(bool do_move) { // we rely on frame not doing anything if it is already shown/hidden if (m_state.useTitlebar()) { client_move |= showTitlebar(); - if (m_screen.getDefaultInternalTabs()) + if (*m_screen.getDefaultInternalTabsResource()) client_move |= setTabMode(INTERNAL); else client_move |= setTabMode(EXTERNAL); diff --git a/src/Screen.cc b/src/Screen.cc index d34990a..d8ec167 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1555,7 +1555,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar, "Tabs in Titlebar", "Tabs in Titlebar", - resource.default_internal_tabs, save_and_reconftabs); + resource.default_internal_tabs, saverc_cmd); tab_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Common, MaximizeOver, "Maximize Over", "Maximize over this thing when maximizing"), resource.max_over_tabs, save_and_reconfigure)); diff --git a/src/Screen.hh b/src/Screen.hh index 0321940..c524a91 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -124,7 +124,7 @@ public: unsigned int noFocusWhileTypingDelay() const { return *resource.typing_delay; } const bool allowRemoteActions() const { return *resource.allow_remote_actions; } const bool clientMenuUsePixmap() const { return *resource.clientmenu_use_pixmap; } - const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; } + FbTk::BoolResource &getDefaultInternalTabsResource() { return resource.default_internal_tabs; } FbTk::BoolResource &getTabsUsePixmapResource() { return resource.tabs_use_pixmap; } const bool getMaxOverTabs() const { return *resource.max_over_tabs; } diff --git a/src/Window.cc b/src/Window.cc index d381e17..d82a0b1 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -429,6 +429,9 @@ void FluxboxWindow::init() { m_timer.setCommand(raise_cmd); m_timer.fireOnce(true); + join(screen().getDefaultInternalTabsResource().modifiedSig(), + FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::applyDecorations)); + /**************************************************/ /* Read state above here, apply state below here. */ /**************************************************/ -- cgit v0.11.2