cosmetics
Mathias Gumz akira at fluxbox dot org
1 files changed,
9 insertions(+),
6 deletions(-)
jump to
M
util/fbsetroot.cc
→
util/fbsetroot.cc
@@ -234,6 +234,9 @@ Draws pixmaps with an 16x16 pattern with
fg and bg colors. */ void fbsetroot::modula(int x, int y) { + + const int s = 16; + char data[32]; long pattern = 0;@@ -241,13 +244,13 @@ register int i;
FbRootWindow root(screen); - for (i = 0; i < 16; i++) { + for (i = 0; i < s; i++) { pattern <<= 1; if ((i % x) == 0) pattern |= 0x0001; } - for (i = 0; i < 16; i++) { + for (i = 0; i < s; i++) { if ((i % y) == 0) { data[(i * 2)] = (char) 0xff; data[(i * 2) + 1] = (char) 0xff;@@ -262,11 +265,11 @@ Pixmap bitmap, r_bitmap;
bitmap = XCreateBitmapFromData(display(), - root.window(), data, 16, 16); + root.window(), data, s, s); // bitmap used as tile, needs to have the same depth as background pixmap r_bitmap = XCreatePixmap(display(), - root.window(), 16, 16, + root.window(), s, s, (root.depth() == 32 ? 24 : root.depth())); FbTk::Color f(fore, screen), b(back, screen);@@ -283,7 +286,7 @@ gc.setBackground(b);
// copying bitmap to the one going to be used as tile XCopyPlane(display(), bitmap, r_bitmap, gc.gc(), - 0, 0, 16, 16, 0, 0, 1l); + 0, 0, s, s, 0, 0, 1l); gc.setTile(r_bitmap); gc.setFillStyle(FillTiled);@@ -361,7 +364,7 @@ Shows information about usage
*/ void fbsetroot::usage(int exit_code) { _FB_USES_NLS; - cout << m_app_name << " 2.3 : (c) 2003-2006 Fluxbox Development Team" << endl; + cout << m_app_name << " 2.3 : (c) 2003-2011 Fluxbox Development Team" << endl; cout << m_app_name << " 2.1 : (c) 2002 Claes Nasten" << endl; cout << m_app_name << " 2.0 : (c) 1997-2000 Brad Hughes\n" << endl; cout << _FB_CONSOLETEXT(fbsetroot, Usage,