diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-07-01 21:09:40 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-07-02 03:36:34 (GMT) |
commit | 848875eb922c1ab2eb61d7f8750cdbeed2629b37 (patch) | |
tree | b8c922bfd93a2086c9413a93f90f4b8af287470e /util | |
parent | b6f620597b71e13af508e583953aa964757af6ab (diff) | |
download | fluxbox-848875eb922c1ab2eb61d7f8750cdbeed2629b37.zip fluxbox-848875eb922c1ab2eb61d7f8750cdbeed2629b37.tar.bz2 |
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
Diffstat (limited to 'util')
-rw-r--r-- | util/fbsetroot.cc | 13 |
1 files 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; | |||
38 | using std::endl; | 38 | using std::endl; |
39 | using std::string; | 39 | using std::string; |
40 | 40 | ||
41 | inline int getRootDepth(const FbTk::FbWindow& w) { | ||
42 | return (w.depth() == 32 ? 24 : w.depth()); | ||
43 | } | ||
44 | |||
45 | |||
46 | fbsetroot::fbsetroot(int argc, char **argv, char *dpy_name) | 41 | fbsetroot::fbsetroot(int argc, char **argv, char *dpy_name) |
47 | : FbTk::App(dpy_name), m_app_name(argv[0]) { | 42 | : FbTk::App(dpy_name), m_app_name(argv[0]) { |
48 | 43 | ||
@@ -202,7 +197,7 @@ void fbsetroot::solid() { | |||
202 | pixmap = new Pixmap(XCreatePixmap(display(), | 197 | pixmap = new Pixmap(XCreatePixmap(display(), |
203 | root.window(), | 198 | root.window(), |
204 | root.width(), root.height(), | 199 | root.width(), root.height(), |
205 | getRootDepth(root))); | 200 | root.depth())); |
206 | 201 | ||
207 | XFillRectangle(display(), *pixmap, gc.gc(), 0, 0, | 202 | XFillRectangle(display(), *pixmap, gc.gc(), 0, 0, |
208 | root.width(), root.height()); | 203 | root.width(), root.height()); |
@@ -254,7 +249,7 @@ void fbsetroot::modula(int x, int y) { | |||
254 | // bitmap used as tile, needs to have the same depth as background pixmap | 249 | // bitmap used as tile, needs to have the same depth as background pixmap |
255 | r_bitmap = XCreatePixmap(display(), | 250 | r_bitmap = XCreatePixmap(display(), |
256 | root.window(), s, s, | 251 | root.window(), s, s, |
257 | (root.depth() == 32 ? 24 : root.depth())); | 252 | root.depth()); |
258 | 253 | ||
259 | FbTk::Color f(fore, screen), b(back, screen); | 254 | FbTk::Color f(fore, screen), b(back, screen); |
260 | 255 | ||
@@ -278,7 +273,7 @@ void fbsetroot::modula(int x, int y) { | |||
278 | pixmap = new Pixmap(XCreatePixmap(display(), | 273 | pixmap = new Pixmap(XCreatePixmap(display(), |
279 | root.window(), | 274 | root.window(), |
280 | root.width(), root.height(), | 275 | root.width(), root.height(), |
281 | getRootDepth(root))); | 276 | root.depth())); |
282 | 277 | ||
283 | XFillRectangle(display(), *pixmap, gc.gc(), 0, 0, | 278 | XFillRectangle(display(), *pixmap, gc.gc(), 0, 0, |
284 | root.width(), root.height()); | 279 | root.width(), root.height()); |
@@ -324,7 +319,7 @@ void fbsetroot::gradient() { | |||
324 | pixmap = new Pixmap(XCreatePixmap(display(), | 319 | pixmap = new Pixmap(XCreatePixmap(display(), |
325 | root.window(), | 320 | root.window(), |
326 | root.width(), root.height(), | 321 | root.width(), root.height(), |
327 | getRootDepth(root))); | 322 | root.depth())); |
328 | 323 | ||
329 | 324 | ||
330 | XCopyArea(display(), tmp, *pixmap, gc.gc(), 0, 0, | 325 | XCopyArea(display(), tmp, *pixmap, gc.gc(), 0, 0, |