From 286ff6817b7b127aae30b1daa4e5cb1a69880b72 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sun, 27 Oct 2013 22:24:57 -0500 Subject: [PATCH] compositor-wayland: Flush the display on commit This fixes the problem where animations will wait to play until input is received. In general, it also makes the backend far more responsive. Signed-off-by: Jason Ekstrand https://bugs.freedesktop.org/show_bug.cgi?id=68221 --- src/compositor-wayland.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index 3ab8785..d626ee1 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -194,6 +194,8 @@ static void wayland_output_start_repaint_loop(struct weston_output *output_base) { struct wayland_output *output = (struct wayland_output *) output_base; + struct wayland_compositor *wc = + (struct wayland_compositor *)output->base.compositor; struct wl_callback *callback; /* If this is the initial frame, we need to attach a buffer so that @@ -210,6 +212,7 @@ wayland_output_start_repaint_loop(struct weston_output *output_base) callback = wl_surface_frame(output->parent.surface); wl_callback_add_listener(callback, &frame_listener, output); wl_surface_commit(output->parent.surface); + wl_display_flush(wc->parent.wl_display); } static int -- 2.7.4