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.
mathias mathias
2 files changed,
6 insertions(+),
3 deletions(-)
M
src/FbTk/Theme.cc
→
src/FbTk/Theme.cc
@@ -135,8 +135,10 @@ // notify all themes that we reconfigured
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; }
M
src/Screen.cc
→
src/Screen.cc
@@ -368,7 +368,8 @@ // else the focus label doesn't get updated
// 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,