summaryrefslogtreecommitdiff
path: root/src/FbRootWindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbRootWindow.cc')
-rw-r--r--src/FbRootWindow.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/FbRootWindow.cc b/src/FbRootWindow.cc
index 7e2b77e..b5db823 100644
--- a/src/FbRootWindow.cc
+++ b/src/FbRootWindow.cc
@@ -44,9 +44,10 @@ FbRootWindow::FbRootWindow(int screen_num):
44 vinfo_nitems > 0) { 44 vinfo_nitems > 0) {
45 45
46 for (int i = 0; i < vinfo_nitems; i++) { 46 for (int i = 0; i < vinfo_nitems; i++) {
47 // We can't handle 32-bit visuals just yet (Composite ARGB) 47 if (DefaultDepth(disp, screen_num) < vinfo_return[i].depth) {
48 if (vinfo_return[i].depth != 32 && DefaultDepth(disp, screen_num) < vinfo_return[i].depth)
49 m_visual = vinfo_return[i].visual; 48 m_visual = vinfo_return[i].visual;
49 setDepth(vinfo_return[i].depth);
50 }
50 } 51 }
51 52
52 XFree(vinfo_return); 53 XFree(vinfo_return);
@@ -58,5 +59,6 @@ FbRootWindow::FbRootWindow(int screen_num):
58 } else { 59 } else {
59 m_visual = DefaultVisual(disp, screen_num); 60 m_visual = DefaultVisual(disp, screen_num);
60 m_colormap = DefaultColormap(disp, screen_num); 61 m_colormap = DefaultColormap(disp, screen_num);
62 setDepth(DefaultDepth(disp, screen_num));
61 } 63 }
62} 64}