From ebfe4f98246c1fe3592e87ca4936da90bd9cb3a5 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 a8ee4d5..1c34efd 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -84,7 +84,7 @@ FbWinFrame::FbWinFrame(BScreen &screen, WindowState &state, 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), @@ -1448,7 +1448,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 339ec06..c97b0a3 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