all repos — fluxbox @ 150777e336db88c2dbfd2a257171ce51bec7a718

custom fork of the fluxbox windowmanager

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
commit

150777e336db88c2dbfd2a257171ce51bec7a718

parent

abce9a0c27b6e6697c30282723b581fbd6684b5e

2 files changed, 6 insertions(+), 3 deletions(-)

jump to
M src/FbTk/Theme.ccsrc/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.ccsrc/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,