diff options
| -rw-r--r-- | src/x.cc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |
