From 848875eb922c1ab2eb61d7f8750cdbeed2629b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 1 Jul 2016 23:09:40 +0200 Subject: Revert "bugfix: fbsetroot needs to use 24bit visuals as well" This reverts commit 4f4d5e25d9a0cf1fc4c0d1a8b7777a560494b7a4. The patch resolved a problem introduced by the ::setDepth abuse in FbRootWindow, but this fails if the root window is *really* 32bit With commit dcdde4d, the broken workaround depth selection is no longer required. BUG: 1093 --- util/fbsetroot.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/util/fbsetroot.cc b/util/fbsetroot.cc index 07f6b68..0859960 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, -- cgit v0.11.2