aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-19 09:40:14 (GMT)
committerfluxgen <fluxgen>2003-05-19 09:40:14 (GMT)
commit68e9677bbb9ebe8f7c1a5edea25f236c09ed3460 (patch)
treefd2162106c61376702d9c0990b05fab9c874d3d2 /util
parentc62dc1e2afbf28d59b472ef720f338edb2ef463b (diff)
downloadfluxbox_paul-68e9677bbb9ebe8f7c1a5edea25f236c09ed3460.zip
fluxbox_paul-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.cc19
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*/
249void bsetroot::modula(int x, int y) { 250void 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*/
334void bsetroot::gradient(void) { 335void 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