From 95979a5e611569e50ffb60417a82703125559b4f 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 937f87f..d51ffdf 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -103,7 +103,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), @@ -1467,7 +1467,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 87b6923..c8e4ad7 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1636,7 +1636,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 58fd5ba..81812ba 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -125,7 +125,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 a8756b7..fae5272 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -441,6 +441,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