wayland: use a low priority FDM hook to flush the wayland socket

This way, we don't have to manually insert flushes in code paths that
may execute outside of a wl_display_dispatch_pending().

(Those that execute inside a wl_display_dispatch_pending() are subject
to the flush performed at the end of the normal wayland FDM handler).
This commit is contained in:
Daniel Eklöf 2020-01-04 23:27:59 +01:00
parent 6534f64e6a
commit 4cbd894803
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 14 additions and 3 deletions

View file

@ -852,7 +852,6 @@ grid_render(struct terminal *term)
}
wl_surface_commit(term->window->surface);
wayl_flush(term->wl);
#if TIME_FRAME_RENDERING
struct timeval end_time;
@ -1141,7 +1140,6 @@ render_xcursor_update(struct wayland *wayl, const struct terminal *term)
wl_callback_add_listener(wayl->pointer.xcursor_callback, &xcursor_listener, wayl);
wl_surface_commit(wayl->pointer.surface);
wayl_flush(wayl);
}
static void