diff options
author | fluxgen <fluxgen> | 2003-05-19 09:40:14 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-05-19 09:40:14 (GMT) |
commit | 68e9677bbb9ebe8f7c1a5edea25f236c09ed3460 (patch) | |
tree | fd2162106c61376702d9c0990b05fab9c874d3d2 /util | |
parent | c62dc1e2afbf28d59b472ef720f338edb2ef463b (diff) | |
download | fluxbox-68e9677bbb9ebe8f7c1a5edea25f236c09ed3460.zip fluxbox-68e9677bbb9ebe8f7c1a5edea25f236c09ed3460.tar.bz2 |
fixed minor bug in solid rendering, makes sure we get valid color string before we set background
Diffstat (limited to 'util')
-rw-r--r-- | util/bsetroot.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/util/bsetroot.cc b/util/bsetroot.cc index 2b87282..4e03e0b 100644 --- a/util/bsetroot.cc +++ b/util/bsetroot.cc | |||
@@ -18,7 +18,7 @@ | |||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | 20 | ||
21 | // $Id: bsetroot.cc,v 1.17 2003/05/11 00:00:32 fluxgen Exp $ | 21 | // $Id: bsetroot.cc,v 1.18 2003/05/19 09:40:14 fluxgen Exp $ |
22 | 22 | ||
23 | #include "bsetroot.hh" | 23 | #include "bsetroot.hh" |
24 | 24 | ||
@@ -208,14 +208,15 @@ void bsetroot::solid() { | |||
208 | pixmaps = new Pixmap[ScreenCount(display())]; | 208 | pixmaps = new Pixmap[ScreenCount(display())]; |
209 | 209 | ||
210 | for (; screen < ScreenCount(display()); screen++) { | 210 | for (; screen < ScreenCount(display()); screen++) { |
211 | FbTk::Color c; | ||
212 | if (!c.setFromString(fore, screen)) // just report error | ||
213 | continue; | ||
214 | |||
211 | FbRootWindow root(screen); | 215 | FbRootWindow root(screen); |
212 | 216 | ||
213 | FbTk::Color c; | ||
214 | GC gc; | 217 | GC gc; |
215 | XGCValues gcv; | 218 | XGCValues gcv; |
216 | 219 | ||
217 | c.setFromString(fore, screen); | ||
218 | |||
219 | if (! c.isAllocated()) | 220 | if (! c.isAllocated()) |
220 | c.setPixel(BlackPixel(display(), screen)); | 221 | c.setPixel(BlackPixel(display(), screen)); |
221 | 222 | ||
@@ -242,10 +243,10 @@ void bsetroot::solid() { | |||
242 | } | 243 | } |
243 | } | 244 | } |
244 | 245 | ||
245 | //-------------- modula ------------------ | 246 | /** |
246 | // draws pixmaps with an 16x16 pattern with | 247 | Draws pixmaps with an 16x16 pattern with |
247 | // fg and bg colors. | 248 | fg and bg colors. |
248 | //----------------------------------------- | 249 | */ |
249 | void bsetroot::modula(int x, int y) { | 250 | void bsetroot::modula(int x, int y) { |
250 | char data[32]; | 251 | char data[32]; |
251 | long pattern; | 252 | long pattern; |
@@ -331,7 +332,7 @@ void bsetroot::modula(int x, int y) { | |||
331 | /** | 332 | /** |
332 | draws pixmaps with a fluxbox texure | 333 | draws pixmaps with a fluxbox texure |
333 | */ | 334 | */ |
334 | void bsetroot::gradient(void) { | 335 | void bsetroot::gradient() { |
335 | // using temporaray pixmap and then copying it to background pixmap, as it'll | 336 | // using temporaray pixmap and then copying it to background pixmap, as it'll |
336 | // get crashed somewhere on the way causing apps like XChat chrashing | 337 | // get crashed somewhere on the way causing apps like XChat chrashing |
337 | // as the pixmap has been destroyed | 338 | // as the pixmap has been destroyed |