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.
This commit is contained in:
mathias 2005-03-16 22:44:48 +00:00
parent abce9a0c27
commit 150777e336
2 changed files with 6 additions and 3 deletions

View file

@ -135,9 +135,11 @@ 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
if (screen_num < 0 || (*theme_it)->screenNum() == screen_num) {
(*theme_it)->reconfigTheme();
(*theme_it)->reconfigSig().notify();
}
}
return true;
}

View file

@ -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,