summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/x.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/x.cc b/src/x.cc
index d5bdd5a..53b09d4 100644
--- a/src/x.cc
+++ b/src/x.cc
@@ -221,7 +221,7 @@ Format get_best_format(xcb_connection_t* conn, xcb_screen_t const* screen,
continue;
}
PixelFormat f;
- if (v->bits_per_rgb_value != 8) continue;
+ if (v->bits_per_rgb_value < 8) continue;
if (v->red_mask == 0xff0000 && v->green_mask == 0xff00
&& v->blue_mask == 0xff) {
f = ARGB_8888;
@@ -258,6 +258,7 @@ Format get_best_format(xcb_connection_t* conn, xcb_screen_t const* screen,
}
if (render) break;
}
+ if (visual && (!render_formats || render)) break;
xcb_depth_next(&iter);
}
if (!depth) {