all repos — fluxbox @ 1ef653cd9333aabcdecb4e69b3797edb46bf0d42

custom fork of the fluxbox windowmanager

little hack to make sure background only loads once
symptom of a deeper problem with loading styles
markt markt
commit

1ef653cd9333aabcdecb4e69b3797edb46bf0d42

parent

2e7fd56817ab5123dfddfb12b2f154adf905f236

2 files changed, 9 insertions(+), 1 deletions(-)

jump to
M src/RootTheme.ccsrc/RootTheme.cc

@@ -109,6 +109,7 @@ m_background(new BackgroundItem(*this, "background", "Background")),

m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())), m_root_command(root_command), m_image_ctrl(image_control), + m_already_set(false), m_background_loaded(true) { Display *disp = FbTk::App::instance()->display();

@@ -136,6 +137,11 @@ }

void RootTheme::reconfigTheme() { _FB_USES_NLS; + + if (m_already_set) + return; + else + m_already_set = true; // if user specified background in the config then use it // instead of style background
M src/RootTheme.hhsrc/RootTheme.hh

@@ -51,7 +51,8 @@ ~RootTheme();

bool fallback(FbTk::ThemeItem_base &item); void reconfigTheme(); - void setLoaded() { m_background_loaded = true; } + // little hack to deal with reconfigures -- should be fixed + void setLoaded() { m_background_loaded = true; m_already_set = false; } GC opGC() const { return m_opgc.gc(); }

@@ -68,6 +69,7 @@ FbTk::GContext m_opgc;

const std::string &m_root_command; FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture bool m_background_loaded; ///< whether or not the background is present in the style file + bool m_already_set; };