aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-10-21 06:34:53 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-10-21 06:34:53 (GMT)
commit8dd11efc76cf4e1438d634fc456495d5cbd9be76 (patch)
tree111cd20cf6fc75030fdb93daedae15865a526308 /util
parent4f4d5e25d9a0cf1fc4c0d1a8b7777a560494b7a4 (diff)
downloadfluxbox_paul-8dd11efc76cf4e1438d634fc456495d5cbd9be76.zip
fluxbox_paul-8dd11efc76cf4e1438d634fc456495d5cbd9be76.tar.bz2
cosmetics
Diffstat (limited to 'util')
-rw-r--r--util/fbsetroot.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/util/fbsetroot.cc b/util/fbsetroot.cc
index e18e829..71ff34d 100644
--- a/util/fbsetroot.cc
+++ b/util/fbsetroot.cc
@@ -234,6 +234,9 @@ void fbsetroot::solid() {
234 fg and bg colors. 234 fg and bg colors.
235*/ 235*/
236void fbsetroot::modula(int x, int y) { 236void fbsetroot::modula(int x, int y) {
237
238 const int s = 16;
239
237 char data[32]; 240 char data[32];
238 long pattern = 0; 241 long pattern = 0;
239 242
@@ -241,13 +244,13 @@ void fbsetroot::modula(int x, int y) {
241 244
242 FbRootWindow root(screen); 245 FbRootWindow root(screen);
243 246
244 for (i = 0; i < 16; i++) { 247 for (i = 0; i < s; i++) {
245 pattern <<= 1; 248 pattern <<= 1;
246 if ((i % x) == 0) 249 if ((i % x) == 0)
247 pattern |= 0x0001; 250 pattern |= 0x0001;
248 } 251 }
249 252
250 for (i = 0; i < 16; i++) { 253 for (i = 0; i < s; i++) {
251 if ((i % y) == 0) { 254 if ((i % y) == 0) {
252 data[(i * 2)] = (char) 0xff; 255 data[(i * 2)] = (char) 0xff;
253 data[(i * 2) + 1] = (char) 0xff; 256 data[(i * 2) + 1] = (char) 0xff;
@@ -262,11 +265,11 @@ void fbsetroot::modula(int x, int y) {
262 265
263 266
264 bitmap = XCreateBitmapFromData(display(), 267 bitmap = XCreateBitmapFromData(display(),
265 root.window(), data, 16, 16); 268 root.window(), data, s, s);
266 269
267 // bitmap used as tile, needs to have the same depth as background pixmap 270 // bitmap used as tile, needs to have the same depth as background pixmap
268 r_bitmap = XCreatePixmap(display(), 271 r_bitmap = XCreatePixmap(display(),
269 root.window(), 16, 16, 272 root.window(), s, s,
270 (root.depth() == 32 ? 24 : root.depth())); 273 (root.depth() == 32 ? 24 : root.depth()));
271 274
272 FbTk::Color f(fore, screen), b(back, screen); 275 FbTk::Color f(fore, screen), b(back, screen);
@@ -283,7 +286,7 @@ void fbsetroot::modula(int x, int y) {
283 286
284 // copying bitmap to the one going to be used as tile 287 // copying bitmap to the one going to be used as tile
285 XCopyPlane(display(), bitmap, r_bitmap, gc.gc(), 288 XCopyPlane(display(), bitmap, r_bitmap, gc.gc(),
286 0, 0, 16, 16, 0, 0, 1l); 289 0, 0, s, s, 0, 0, 1l);
287 290
288 gc.setTile(r_bitmap); 291 gc.setTile(r_bitmap);
289 gc.setFillStyle(FillTiled); 292 gc.setFillStyle(FillTiled);
@@ -361,7 +364,7 @@ void fbsetroot::gradient() {
361*/ 364*/
362void fbsetroot::usage(int exit_code) { 365void fbsetroot::usage(int exit_code) {
363 _FB_USES_NLS; 366 _FB_USES_NLS;
364 cout << m_app_name << " 2.3 : (c) 2003-2006 Fluxbox Development Team" << endl; 367 cout << m_app_name << " 2.3 : (c) 2003-2011 Fluxbox Development Team" << endl;
365 cout << m_app_name << " 2.1 : (c) 2002 Claes Nasten" << endl; 368 cout << m_app_name << " 2.1 : (c) 2002 Claes Nasten" << endl;
366 cout << m_app_name << " 2.0 : (c) 1997-2000 Brad Hughes\n" << endl; 369 cout << m_app_name << " 2.0 : (c) 1997-2000 Brad Hughes\n" << endl;
367 cout << _FB_CONSOLETEXT(fbsetroot, Usage, 370 cout << _FB_CONSOLETEXT(fbsetroot, Usage,