Review the use of XFlush and xcb_flush

Replace most of XFlush with xcb_flush.

Also, in a lot of places, XFlush is used as if it is XSync. Replace
those cases by using xcb's _checked version of functions and
xcb_request_check.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-02-07 00:41:24 +00:00
parent 856ad4b230
commit 22bc79369e
3 changed files with 41 additions and 23 deletions

View File

@ -972,6 +972,7 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) {
// Wait for VBlank. We could do it aggressively (send the painting
// request and XFlush() on VBlank) or conservatively (send the request
// only on VBlank).
// TODO Investigate and potentially remove this option
if (!ps->o.vsync_aggressive)
vsync_wait(ps);
@ -1038,7 +1039,7 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) {
if (ps->o.vsync_aggressive)
vsync_wait(ps);
xcb_flush(ps->c);
x_sync(ps->c);
#ifdef CONFIG_OPENGL
if (glx_has_context(ps)) {