diff options
| author | Joel Klinghed <the_jk@opera.com> | 2017-09-27 10:36:55 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@opera.com> | 2017-09-27 10:36:55 +0200 |
| commit | 5e90e8786a089930d49adce5696508cc959a6045 (patch) | |
| tree | d8877478a44cf71b0fc89c2f45a08f9b0d2e5c52 | |
| parent | a19cd9ffe6193dd798bee46b6c0cf30dc1ac3ab3 (diff) | |
Fix x::get_best_format
| -rw-r--r-- | src/x.cc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -202,9 +202,15 @@ Format get_best_format(xcb_connection_t* conn, xcb_screen_t const* screen, auto iter = xcb_screen_allowed_depths_iterator(screen); while (count--) { auto d = iter.data; - if (d->depth <= depth) continue; + if (d->depth <= depth) { + xcb_depth_next(&iter); + continue; + } auto visuals_count = xcb_depth_visuals_length(d); - if (visuals_count == 0) continue; + if (visuals_count == 0) { + xcb_depth_next(&iter); + continue; + } auto v = xcb_depth_visuals(d); for (; visuals_count--; ++v) { switch (v->_class) { |
