aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--data/styles/Artwiz6
-rw-r--r--data/styles/BlueFlux/theme.cfg3
-rw-r--r--data/styles/Emerge/theme.cfg3
-rw-r--r--data/styles/MerleyKay6
-rw-r--r--data/styles/Outcomes6
-rw-r--r--data/styles/Rampage6
-rw-r--r--data/styles/Results6
-rw-r--r--data/styles/Spiff6
-rw-r--r--doc/asciidoc/fluxbox-style.txt22
-rw-r--r--src/FbTk/Theme.hh4
-rw-r--r--src/RootTheme.cc235
-rw-r--r--src/RootTheme.hh4
-rw-r--r--src/Screen.cc2
14 files changed, 207 insertions, 111 deletions
diff --git a/ChangeLog b/ChangeLog
index 1955aa8..166c15c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/14:
4 * Several changes for background style option: (Mark)
5 - now support `background: mod' to coincide with fbsetroot -mod --
6 In addition to `background.color' and `background.colorTo', this option
7 must also set `background.modX' and `background.modY' to integers
8 - added `background: none' for styles that do not include a background
9 - fixed bug with style backgrounds not getting set when changing styles
10 - updated default styles to be valid wrt background options
11 RootTheme.cc/hh Screen.cc FbTk/Theme.hh
3*07/01/13: 12*07/01/13:
4 * Only change focus order when user specifically focuses a window (Mark) 13 * Only change focus order when user specifically focuses a window (Mark)
5 Screen.cc Window.cc FocusControl.cc/hh 14 Screen.cc Window.cc FocusControl.cc/hh
diff --git a/data/styles/Artwiz b/data/styles/Artwiz
index 32cb182..f413761 100644
--- a/data/styles/Artwiz
+++ b/data/styles/Artwiz
@@ -104,7 +104,11 @@ bevelWidth: 2
104borderWidth: 1 104borderWidth: 1
105handleWidth: 5 105handleWidth: 5
106 106
107!rootCommand: fbsetroot -mod 4 4 -bg rgb:10/18/20 -fg rgb:30/38/40 107background: mod
108background.modX: 4
109background.modY: 4
110background.color: rgb:10/18/20
111background.colorTo: rgb:30/38/40
108 112
109*Font: -*-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-*-* 113*Font: -*-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-*-*
110!*Font: vera-7 114!*Font: vera-7
diff --git a/data/styles/BlueFlux/theme.cfg b/data/styles/BlueFlux/theme.cfg
index 19377fa..745070d 100644
--- a/data/styles/BlueFlux/theme.cfg
+++ b/data/styles/BlueFlux/theme.cfg
@@ -172,3 +172,6 @@ borderWidth: 1
172bevelWidth: 0 172bevelWidth: 0
173handleWidth: 3 173handleWidth: 3
174frameWidth: 0 174frameWidth: 0
175
176! need this here, even though there is no background in the style
177background: none
diff --git a/data/styles/Emerge/theme.cfg b/data/styles/Emerge/theme.cfg
index 9143e5d..3ef4799 100644
--- a/data/styles/Emerge/theme.cfg
+++ b/data/styles/Emerge/theme.cfg
@@ -192,3 +192,6 @@ toolbar.iconbar.empty.colorTo: #cfcfcf
192 192
193toolbar.iconbar.borderWidth: 1 193toolbar.iconbar.borderWidth: 1
194toolbar.iconbar.borderColor: #dbdbdb 194toolbar.iconbar.borderColor: #dbdbdb
195
196! need this here, even though there is no background in the style
197background: none
diff --git a/data/styles/MerleyKay b/data/styles/MerleyKay
index 7a605c4..1a8fdd0 100644
--- a/data/styles/MerleyKay
+++ b/data/styles/MerleyKay
@@ -131,4 +131,8 @@ bevelWidth: 2
131borderWidth: 2 131borderWidth: 2
132handleWidth: 3 132handleWidth: 3
133 133
134!rootCommand: fbsetroot -mod 5 5 -fg rgb:62/70/85 -bg rgb:52/60/75 134background: mod
135background.modX: 5
136background.modY: 5
137background.color: rgb:52/60/75
138background.colorTo: rgb:62/70/85
diff --git a/data/styles/Outcomes b/data/styles/Outcomes
index de97c33..799787a 100644
--- a/data/styles/Outcomes
+++ b/data/styles/Outcomes
@@ -107,7 +107,11 @@ borderWidth: 1
107bevelWidth: 2 107bevelWidth: 2
108handleWidth: 4 108handleWidth: 4
109 109
110rootCommand: fbsetroot -mod 4 4 -fg rgb:54/6/6 -bg grey20 110background: mod
111background.modX: 4
112background.modY: 4
113background.color: grey20
114background.colorTo: rgb:54/6/6
111 115
112! for the bbtools 116! for the bbtools
113menuFont: lucidasans-10 117menuFont: lucidasans-10
diff --git a/data/styles/Rampage b/data/styles/Rampage
index 4e363b6..5fa82c7 100644
--- a/data/styles/Rampage
+++ b/data/styles/Rampage
@@ -99,4 +99,8 @@ handleWidth: 5
99*font: -b&h-lucida-medium-r-normal-*-*-100-*-*-p-*-iso8859-* 99*font: -b&h-lucida-medium-r-normal-*-*-100-*-*-p-*-iso8859-*
100*textColor: black 100*textColor: black
101 101
102rootCommand: fbsetroot -mod 16 8 -bg rgb:0/8/8 -fg rgb:0/9/9 102background: mod
103background.modX: 16
104background.modY: 8
105background.color: rgb:0/8/8
106background.colorTo: rgb:0/9/9
diff --git a/data/styles/Results b/data/styles/Results
index 702a586..eed32e7 100644
--- a/data/styles/Results
+++ b/data/styles/Results
@@ -107,7 +107,11 @@ borderWidth: 1
107bevelWidth: 2 107bevelWidth: 2
108handleWidth: 4 108handleWidth: 4
109 109
110rootCommand: fbsetroot -mod 4 4 -fg rgb:6/6/5c -bg grey20 110background: mod
111background.modX: 4
112background.modY: 4
113background.color: grey20
114background.colorTo: rgb:6/6/5c
111 115
112! for the bbtools 116! for the bbtools
113menuFont: lucidasans-10 117menuFont: lucidasans-10
diff --git a/data/styles/Spiff b/data/styles/Spiff
index f0c5e34..f7629c3 100644
--- a/data/styles/Spiff
+++ b/data/styles/Spiff
@@ -104,6 +104,10 @@ bevelWidth: 1
104borderWidth: 1 104borderWidth: 1
105handleWidth: 3 105handleWidth: 3
106 106
107rootCommand: fbsetroot -mod 2 2 -fg rgb:48/50/68 -bg rgb:50/58/70 107background: mod
108background.modX: 2
109background.modY: 2
110background.color: rgb:50/58/70
111background.colorTo: rgb:48/50/68
108 112
109*Font: lucidasans-10 113*Font: lucidasans-10
diff --git a/doc/asciidoc/fluxbox-style.txt b/doc/asciidoc/fluxbox-style.txt
index ab325ae..e5e44a0 100644
--- a/doc/asciidoc/fluxbox-style.txt
+++ b/doc/asciidoc/fluxbox-style.txt
@@ -348,15 +348,23 @@ Everything you need to make your menu look pretty.
348 348
349BACKGROUND 349BACKGROUND
350------------ 350------------
351Rarely are you going to want to use this option. There is a command that is 351Every style must specify the background option. If you don't want your style to
352similar that is used in the init file. It is bad style to use this in your 352change the user's background, then use `background: none'. The options
353style, as it forces the user to use your background. So note that it is good 353`centered', `aspect', `tiled', and `fullscreen' require the `background.pixmap'
354practice to leave this blank or out of the style altogether. 354resource to contain a valid file name. The `random' option requires
355 355`background.pixmap' to contain a valid directory name. For these options,
356 background: centered|aspect|tiled|fullscreen|random|solid|gradient <texture> 356fluxbox(1) will call fbsetbg(1) to set the background. The options `gradient',
357 background.pixmap: <file (or directory for random)> 357`solid', and `mod' all require `background.color' to be set. `gradient' and
358`mod' both require `background.colorTo'. `mod' requires `background.modX' and
359`background.modY' to be set as well. These options will be passed to
360fbsetroot(1) to set the background.
361
362 background: centered|aspect|tiled|fullscreen|random|solid|gradient <texture>|mod|none
363 background.pixmap: <file or directory>
358 background.color: <color> 364 background.color: <color>
359 background.colorTo: <color> 365 background.colorTo: <color>
366 background.modX: <integer>
367 background.modY: <integer>
360 368
361SLIT 369SLIT
362---- 370----
diff --git a/src/FbTk/Theme.hh b/src/FbTk/Theme.hh
index 70b782a..df2cea7 100644
--- a/src/FbTk/Theme.hh
+++ b/src/FbTk/Theme.hh
@@ -68,11 +68,11 @@ public:
68 /// specialized 68 /// specialized
69 void setDefaultValue(); 69 void setDefaultValue();
70 /// specialized 70 /// specialized
71 void setFromString(const char *strval); 71 virtual void setFromString(const char *strval);
72 /// specialized 72 /// specialized
73 // name and altname may be different to the primary ones (e.g. from fallback) 73 // name and altname may be different to the primary ones (e.g. from fallback)
74 // if they are null, then the original name is used 74 // if they are null, then the original name is used
75 void load(const std::string *name = 0, const std::string *altname = 0); 75 virtual void load(const std::string *name = 0, const std::string *altname = 0);
76 /** 76 /**
77 @name access operators 77 @name access operators
78 */ 78 */
diff --git a/src/RootTheme.cc b/src/RootTheme.cc
index 6847fc2..eeb95f9 100644
--- a/src/RootTheme.cc
+++ b/src/RootTheme.cc
@@ -48,7 +48,8 @@ using std::string;
48class BackgroundItem: public FbTk::ThemeItem<FbTk::Texture> { 48class BackgroundItem: public FbTk::ThemeItem<FbTk::Texture> {
49public: 49public:
50 BackgroundItem(FbTk::Theme &tm, const std::string &name, const std::string &altname): 50 BackgroundItem(FbTk::Theme &tm, const std::string &name, const std::string &altname):
51 FbTk::ThemeItem<FbTk::Texture>(tm, name, altname) { 51 FbTk::ThemeItem<FbTk::Texture>(tm, name, altname),
52 m_changed(false), m_loaded(false) {
52 53
53 } 54 }
54 55
@@ -56,6 +57,9 @@ public:
56 const string &m_name = (o_name == 0) ? name() : *o_name; 57 const string &m_name = (o_name == 0) ? name() : *o_name;
57 const string &m_altname = (o_altname == 0) ? altName() : *o_altname; 58 const string &m_altname = (o_altname == 0) ? altName() : *o_altname;
58 59
60 // if we got this far, then the background was loaded
61 m_loaded = true;
62
59 // create subnames 63 // create subnames
60 string color_name(FbTk::ThemeManager::instance(). 64 string color_name(FbTk::ThemeManager::instance().
61 resourceValue(m_name + ".color", m_altname + ".Color")); 65 resourceValue(m_name + ".color", m_altname + ".Color"));
@@ -63,9 +67,59 @@ public:
63 resourceValue(m_name + ".colorTo", m_altname + ".ColorTo")); 67 resourceValue(m_name + ".colorTo", m_altname + ".ColorTo"));
64 string pixmap_name(FbTk::ThemeManager::instance(). 68 string pixmap_name(FbTk::ThemeManager::instance().
65 resourceValue(m_name + ".pixmap", m_altname + ".Pixmap")); 69 resourceValue(m_name + ".pixmap", m_altname + ".Pixmap"));
70 string mod_x(FbTk::ThemeManager::instance().
71 resourceValue(m_name + ".modX", m_altname + ".ModX"));
72 string mod_y(FbTk::ThemeManager::instance().
73 resourceValue(m_name + ".modY", m_altname + ".ModY"));
74
75 // validate mod_x and mod_y
76 if (mod_x.length() > 2)
77 mod_x.erase(2,mod_x.length()); // shouldn't be longer than 2 digits
78 if (mod_y.length() > 2)
79 mod_y.erase(2,mod_y.length()); // ditto
80 // should be integers
81 if (!mod_x.length() || mod_x[0] < '0' || mod_x[0] > '9' ||
82 (mod_x.length() == 2 && (mod_x[1] < '0' || mod_x[1] > '9')))
83 mod_x = "1";
84 if (!mod_y.length() || mod_y[0] < '0' || mod_y[0] > '9' ||
85 (mod_y.length() == 2 && (mod_y[1] < '0' || mod_y[1] > '9')))
86 mod_y = "1";
87
88 // check if any of our values have changed
89 if (mod_x != m_mod_x) {
90 m_changed = true;
91 m_mod_x = mod_x;
92 }
93 if (mod_y != m_mod_y) {
94 m_changed = true;
95 m_mod_y = mod_y;
96 }
97 // these aren't quite right, but I don't care
98 if (color_name != m_color) {
99 m_changed = true;
100 m_color = color_name;
101 }
102 if (colorto_name != m_color_to) {
103 m_changed = true;
104 m_color_to = colorto_name;
105 }
106
107 // remove whitespace from filename
108 FbTk::StringUtil::removeFirstWhitespace(pixmap_name);
109 FbTk::StringUtil::removeTrailingWhitespace(pixmap_name);
110
111 if (mod_x != m_mod_x || mod_y != m_mod_y || pixmap_name != m_filename ||
112 color_name != m_color || colorto_name != m_color_to) {
113 m_changed = true;
114 m_mod_x = mod_x;
115 m_mod_y = mod_y;
116 m_filename = pixmap_name;
117
118 // these aren't quite right because of defaults set below
119 m_color = color_name;
120 m_color_to = colorto_name;
121 }
66 122
67 m_color = color_name;
68 m_color_to = colorto_name;
69 // set default value if we failed to load colors 123 // set default value if we failed to load colors
70 if (!(*this)->color().setFromString(color_name.c_str(), 124 if (!(*this)->color().setFromString(color_name.c_str(),
71 theme().screenNum())) 125 theme().screenNum()))
@@ -79,11 +133,6 @@ public:
79 if (((*this)->type() & FbTk::Texture::SOLID) != 0 && ((*this)->type() & FbTk::Texture::FLAT) == 0) 133 if (((*this)->type() & FbTk::Texture::SOLID) != 0 && ((*this)->type() & FbTk::Texture::FLAT) == 0)
80 (*this)->calcHiLoColors(theme().screenNum()); 134 (*this)->calcHiLoColors(theme().screenNum());
81 135
82 // remove whitespace and set filename
83 FbTk::StringUtil::removeFirstWhitespace(pixmap_name);
84 FbTk::StringUtil::removeTrailingWhitespace(pixmap_name);
85 m_filename = pixmap_name;
86
87 // we dont load any pixmap, using external command to set background pixmap 136 // we dont load any pixmap, using external command to set background pixmap
88 (*this)->pixmap() = 0; 137 (*this)->pixmap() = 0;
89 } 138 }
@@ -96,9 +145,17 @@ public:
96 const std::string &options() const { return m_options; } 145 const std::string &options() const { return m_options; }
97 const std::string &colorString() const { return m_color; } 146 const std::string &colorString() const { return m_color; }
98 const std::string &colorToString() const { return m_color_to; } 147 const std::string &colorToString() const { return m_color_to; }
148 const std::string &modX() const { return m_mod_x; }
149 const std::string &modY() const { return m_mod_y; }
150 bool changed() const { return m_changed; }
151 bool loaded() const { return m_loaded; }
152 void setApplied() { m_changed = false; }
153 void unsetLoaded() { m_loaded = false; }
99private: 154private:
100 std::string m_filename, m_options; 155 std::string m_filename, m_options;
101 std::string m_color, m_color_to; 156 std::string m_color, m_color_to;
157 std::string m_mod_x, m_mod_y;
158 bool m_changed, m_loaded;
102}; 159};
103 160
104 161
@@ -108,9 +165,7 @@ RootTheme::RootTheme(const std::string &root_command,
108 m_background(new BackgroundItem(*this, "background", "Background")), 165 m_background(new BackgroundItem(*this, "background", "Background")),
109 m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())), 166 m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())),
110 m_root_command(root_command), 167 m_root_command(root_command),
111 m_image_ctrl(image_control), 168 m_image_ctrl(image_control) {
112 m_already_set(false),
113 m_background_loaded(true) {
114 169
115 Display *disp = FbTk::App::instance()->display(); 170 Display *disp = FbTk::App::instance()->display();
116 m_opgc.setForeground(WhitePixel(disp, screenNum())^BlackPixel(disp, screenNum())); 171 m_opgc.setForeground(WhitePixel(disp, screenNum())^BlackPixel(disp, screenNum()));
@@ -129,7 +184,7 @@ bool RootTheme::fallback(FbTk::ThemeItem_base &item) {
129 // we can deal with it in reconfigureTheme() 184 // we can deal with it in reconfigureTheme()
130 if (item.name() == "background") { 185 if (item.name() == "background") {
131 // mark no background loaded 186 // mark no background loaded
132 m_background_loaded = false; 187 m_background->unsetLoaded();
133 return true; 188 return true;
134 } 189 }
135 return false; 190 return false;
@@ -138,10 +193,19 @@ bool RootTheme::fallback(FbTk::ThemeItem_base &item) {
138void RootTheme::reconfigTheme() { 193void RootTheme::reconfigTheme() {
139 _FB_USES_NLS; 194 _FB_USES_NLS;
140 195
141 if (m_already_set) 196 if (!m_background->loaded()) {
197 cerr<<"Fluxbox: "<<
198 _FB_CONSOLETEXT(Common, BackgroundWarning,
199 "There is no background option specified in this style."
200 " Please consult the manual or read the FAQ.",
201 "Background missing warning")<<endl;
202 return;
203 }
204
205 if (!m_background->changed())
142 return; 206 return;
143 else 207
144 m_already_set = true; 208 m_background->setApplied();
145 209
146 // if user specified background in the config then use it 210 // if user specified background in the config then use it
147 // instead of style background 211 // instead of style background
@@ -151,6 +215,11 @@ void RootTheme::reconfigTheme() {
151 return; 215 return;
152 } 216 }
153 217
218 // style doesn't wish to change the background
219 if (strstr(m_background->options().c_str(), "none") != 0)
220 return;
221
222
154 // 223 //
155 // Else parse background from style 224 // Else parse background from style
156 // 225 //
@@ -158,84 +227,70 @@ void RootTheme::reconfigTheme() {
158 // root window helper 227 // root window helper
159 FbRootWindow rootwin(screenNum()); 228 FbRootWindow rootwin(screenNum());
160 229
161 // if the background theme item was not loaded 230 // handle background option in style
162 231 std::string filename = m_background->filename();
163 if (!m_background_loaded) { 232 FbTk::StringUtil::removeTrailingWhitespace(filename);
164 cerr<<"Fluxbox: "<< 233 FbTk::StringUtil::removeFirstWhitespace(filename);
165 _FB_CONSOLETEXT(Common, BackgroundWarning, 234 // if background argument is a file then
166 "There is no background option specified in this style." 235 // parse image options and call image setting
167 " Please consult the manual or read the FAQ.", 236 // command specified in the resources
168 "Background missing warning")<<endl; 237 filename = FbTk::StringUtil::expandFilename(filename);
169 } else { 238 if (FbTk::FileUtil::isRegularFile(filename.c_str())) {
170 // handle background option in style 239 // parse options
171 std::string filename = m_background->filename(); 240 std::string options;
172 FbTk::StringUtil::removeTrailingWhitespace(filename); 241 if (strstr(m_background->options().c_str(), "tiled") != 0)
173 FbTk::StringUtil::removeFirstWhitespace(filename); 242 options += "-t ";
174 // if background argument is a file then 243 if (strstr(m_background->options().c_str(), "centered") != 0)
175 // parse image options and call image setting 244 options += "-c ";
176 // command specified in the resources 245 if (strstr(m_background->options().c_str(), "aspect") != 0)
177 filename = FbTk::StringUtil::expandFilename(filename); 246 options += "-a ";
178 if (FbTk::FileUtil::isRegularFile(filename.c_str())) {
179 // parse options
180 std::string options;
181 if (strstr(m_background->options().c_str(), "tiled") != 0)
182 options += "-t ";
183 if (strstr(m_background->options().c_str(), "centered") != 0)
184 options += "-c ";
185 if (strstr(m_background->options().c_str(), "aspect") != 0)
186 options += "-a ";
187 247
188 // compose wallpaper application "fbsetbg" with argumetns 248 // compose wallpaper application "fbsetbg" with argumetns
189 std::string commandargs = "fbsetbg " + options + " " + filename; 249 std::string commandargs = "fbsetbg " + options + " " + filename;
190 250
191 // call command with options 251 // call command with options
192 FbCommands::ExecuteCmd exec(commandargs, screenNum()); 252 FbCommands::ExecuteCmd exec(commandargs, screenNum());
193 exec.execute(); 253 exec.execute();
194 254
195 } else if (FbTk::FileUtil::isDirectory(filename.c_str()) && 255 } else if (FbTk::FileUtil::isDirectory(filename.c_str()) &&
196 strstr(m_background->options().c_str(), "random") != 0) { 256 strstr(m_background->options().c_str(), "random") != 0) {
197 std::string commandargs = "fbsetbg -r " + filename; 257 std::string commandargs = "fbsetbg -r " + filename;
198 FbCommands::ExecuteCmd exec(commandargs, screenNum()); 258 FbCommands::ExecuteCmd exec(commandargs, screenNum());
199 exec.execute(); 259 exec.execute();
200 } else { 260 } else {
201 // render normal texture with fbsetroot 261 // render normal texture with fbsetroot
202 262
203 263
204 // Make sure the color strings are valid, 264 // Make sure the color strings are valid,
205 // so we dont pass any `commands` that can be executed 265 // so we dont pass any `commands` that can be executed
206 bool color_valid = 266 bool color_valid =
207 FbTk::Color::validColorString(m_background->colorString().c_str(), 267 FbTk::Color::validColorString(m_background->colorString().c_str(),
208 screenNum()); 268 screenNum());
209 bool color_to_valid = 269 bool color_to_valid =
210 FbTk::Color::validColorString(m_background->colorToString().c_str(), 270 FbTk::Color::validColorString(m_background->colorToString().c_str(),
211 screenNum()); 271 screenNum());
212 272
213 std::string options; 273 std::string options;
214 if (color_valid) 274 if (color_valid)
215 options += "-foreground '" + m_background->colorString() + "' "; 275 options += "-foreground '" + m_background->colorString() + "' ";
216 if (color_to_valid) 276 if (color_to_valid)
217 options += "-background '" + m_background->colorToString() + "' "; 277 options += "-background '" + m_background->colorToString() + "' ";
218 278
219 if ((*m_background)->type() & FbTk::Texture::SOLID && color_valid) 279 if (strstr(m_background->options().c_str(), "mod") != 0)
220 options += "-solid '" + m_background->colorString() + "' "; 280 options += "-mod " + m_background->modX() + " " + m_background->modY();
221 281 else if ((*m_background)->type() & FbTk::Texture::SOLID && color_valid)
222 if ((*m_background)->type() & FbTk::Texture::GRADIENT) { 282 options += "-solid '" + m_background->colorString() + "' ";
223 283
224 if (color_valid) 284 else if ((*m_background)->type() & FbTk::Texture::GRADIENT) {
225 options += "-from '" + m_background->colorString() + "' "; 285 options += "-gradient '" + m_background->options() + "'";
226 if (color_to_valid)
227 options += "-to '" + m_background->colorToString() + "' ";
228
229 options += "-gradient '" + m_background->options() + "'";
230 }
231
232 std::string commandargs = "fbsetroot " + options;
233
234 FbCommands::ExecuteCmd exec(commandargs, screenNum());
235 exec.execute();
236 } 286 }
237 287
238 rootwin.clear(); 288 std::string commandargs = "fbsetroot " + options;
289
290 FbCommands::ExecuteCmd exec(commandargs, screenNum());
291 exec.execute();
239 } 292 }
240 293
294 rootwin.clear();
295
241} 296}
diff --git a/src/RootTheme.hh b/src/RootTheme.hh
index 24e9d36..aee6d85 100644
--- a/src/RootTheme.hh
+++ b/src/RootTheme.hh
@@ -51,8 +51,6 @@ public:
51 51
52 bool fallback(FbTk::ThemeItem_base &item); 52 bool fallback(FbTk::ThemeItem_base &item);
53 void reconfigTheme(); 53 void reconfigTheme();
54 // little hack to deal with reconfigures -- should be fixed
55 void setLoaded() { m_background_loaded = true; m_already_set = false; }
56 54
57 GC opGC() const { return m_opgc.gc(); } 55 GC opGC() const { return m_opgc.gc(); }
58 56
@@ -68,8 +66,6 @@ private:
68 FbTk::GContext m_opgc; 66 FbTk::GContext m_opgc;
69 const std::string &m_root_command; 67 const std::string &m_root_command;
70 FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture 68 FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture
71 bool m_already_set;
72 bool m_background_loaded; ///< whether or not the background is present in the style file
73 69
74}; 70};
75 71
diff --git a/src/Screen.cc b/src/Screen.cc
index 89400fe..a82307d 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -913,8 +913,6 @@ void BScreen::reconfigure() {
913 // notify objects that the screen is reconfigured 913 // notify objects that the screen is reconfigured
914 m_reconfigure_sig.notify(); 914 m_reconfigure_sig.notify();
915 915
916 m_root_theme->setLoaded();
917
918 // Reload style 916 // Reload style
919 FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename(), 917 FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename(),
920 fluxbox->getStyleOverlayFilename(), 918 fluxbox->getStyleOverlayFilename(),