From 150777e336db88c2dbfd2a257171ce51bec7a718 Mon Sep 17 00:00:00 2001 From: mathias Date: Wed, 16 Mar 2005 22:44:48 +0000 Subject: fix for #1152450, when having multiple screens the rootCommand's were called too often: m_root_menu is locked for the current screen when loading the style for the current screen, but not for the screens already initialized and thus its executed when called thru Theme::reconfigure(); now only the themes on the same screen are affected by the load-routine. --- src/FbTk/Theme.cc | 6 ++++-- src/Screen.cc | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc index 7f6e9dc..e6a07d0 100644 --- a/src/FbTk/Theme.cc +++ b/src/FbTk/Theme.cc @@ -135,8 +135,10 @@ bool ThemeManager::load(const std::string &filename, int screen_num) { theme_it = m_themelist.begin(); for (; theme_it != theme_it_end; ++theme_it) { // send reconfiguration signal to theme and listeners - (*theme_it)->reconfigTheme(); - (*theme_it)->reconfigSig().notify(); + if (screen_num < 0 || (*theme_it)->screenNum() == screen_num) { + (*theme_it)->reconfigTheme(); + (*theme_it)->reconfigSig().notify(); + } } return true; } diff --git a/src/Screen.cc b/src/Screen.cc index 106ba00..fae0aff 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -368,7 +368,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm, // So we lock root theme temporary so it doesn't uses RootTheme::reconfigTheme // This must be fixed in the future. m_root_theme->lock(true); - FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename()); + FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename(), + m_root_theme->screenNum()); m_root_theme->lock(false); m_root_theme->setLineAttributes(*resource.gc_line_width, *resource.gc_line_style, -- cgit v0.11.2