diff options
-rw-r--r-- | src/RootTheme.cc | 6 | ||||
-rw-r--r-- | src/RootTheme.hh | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/RootTheme.cc b/src/RootTheme.cc index 61c7b65..6847fc2 100644 --- a/src/RootTheme.cc +++ b/src/RootTheme.cc | |||
@@ -109,6 +109,7 @@ RootTheme::RootTheme(const std::string &root_command, | |||
109 | m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())), | 109 | m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())), |
110 | m_root_command(root_command), | 110 | m_root_command(root_command), |
111 | m_image_ctrl(image_control), | 111 | m_image_ctrl(image_control), |
112 | m_already_set(false), | ||
112 | m_background_loaded(true) { | 113 | m_background_loaded(true) { |
113 | 114 | ||
114 | Display *disp = FbTk::App::instance()->display(); | 115 | Display *disp = FbTk::App::instance()->display(); |
@@ -137,6 +138,11 @@ bool RootTheme::fallback(FbTk::ThemeItem_base &item) { | |||
137 | void RootTheme::reconfigTheme() { | 138 | void RootTheme::reconfigTheme() { |
138 | _FB_USES_NLS; | 139 | _FB_USES_NLS; |
139 | 140 | ||
141 | if (m_already_set) | ||
142 | return; | ||
143 | else | ||
144 | m_already_set = true; | ||
145 | |||
140 | // if user specified background in the config then use it | 146 | // if user specified background in the config then use it |
141 | // instead of style background | 147 | // instead of style background |
142 | if (!m_root_command.empty()) { | 148 | if (!m_root_command.empty()) { |
diff --git a/src/RootTheme.hh b/src/RootTheme.hh index 9b45d60..7c1f8b5 100644 --- a/src/RootTheme.hh +++ b/src/RootTheme.hh | |||
@@ -51,7 +51,8 @@ public: | |||
51 | 51 | ||
52 | bool fallback(FbTk::ThemeItem_base &item); | 52 | bool fallback(FbTk::ThemeItem_base &item); |
53 | void reconfigTheme(); | 53 | void reconfigTheme(); |
54 | void setLoaded() { m_background_loaded = true; } | 54 | // little hack to deal with reconfigures -- should be fixed |
55 | void setLoaded() { m_background_loaded = true; m_already_set = false; } | ||
55 | 56 | ||
56 | GC opGC() const { return m_opgc.gc(); } | 57 | GC opGC() const { return m_opgc.gc(); } |
57 | 58 | ||
@@ -68,6 +69,7 @@ private: | |||
68 | const std::string &m_root_command; | 69 | const std::string &m_root_command; |
69 | FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture | 70 | FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture |
70 | bool m_background_loaded; ///< whether or not the background is present in the style file | 71 | bool m_background_loaded; ///< whether or not the background is present in the style file |
72 | bool m_already_set; | ||
71 | 73 | ||
72 | }; | 74 | }; |
73 | 75 | ||