diff --git a/util/fbsetroot.cc b/util/fbsetroot.cc index 07f6b685..08599602 100644 --- a/util/fbsetroot.cc +++ b/util/fbsetroot.cc @@ -38,11 +38,6 @@ using std::cerr; using std::endl; using std::string; -inline int getRootDepth(const FbTk::FbWindow& w) { - return (w.depth() == 32 ? 24 : w.depth()); -} - - fbsetroot::fbsetroot(int argc, char **argv, char *dpy_name) : FbTk::App(dpy_name), m_app_name(argv[0]) { @@ -202,7 +197,7 @@ void fbsetroot::solid() { pixmap = new Pixmap(XCreatePixmap(display(), root.window(), root.width(), root.height(), - getRootDepth(root))); + root.depth())); XFillRectangle(display(), *pixmap, gc.gc(), 0, 0, root.width(), root.height()); @@ -254,7 +249,7 @@ void fbsetroot::modula(int x, int y) { // bitmap used as tile, needs to have the same depth as background pixmap r_bitmap = XCreatePixmap(display(), root.window(), s, s, - (root.depth() == 32 ? 24 : root.depth())); + root.depth()); FbTk::Color f(fore, screen), b(back, screen); @@ -278,7 +273,7 @@ void fbsetroot::modula(int x, int y) { pixmap = new Pixmap(XCreatePixmap(display(), root.window(), root.width(), root.height(), - getRootDepth(root))); + root.depth())); XFillRectangle(display(), *pixmap, gc.gc(), 0, 0, root.width(), root.height()); @@ -324,7 +319,7 @@ void fbsetroot::gradient() { pixmap = new Pixmap(XCreatePixmap(display(), root.window(), root.width(), root.height(), - getRootDepth(root))); + root.depth())); XCopyArea(display(), tmp, *pixmap, gc.gc(), 0, 0,