summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-01-26 08:47:04 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-01-26 08:47:04 -0500
commit2200d70e568abb544f62f0ecc70f7dccd7c6a660 (patch)
treed6472a3620f5cb617e3ccd3a6ba82494bdb11491 /src
parent30c018be3a665f7397f3e2686ab0688c23d70abe (diff)
compositor: Clear repaint_scheduled when an idle repaint is cancelled
We don't hit this case often, but if we did, the compositor would get stuck thinking a repaint was already scheduled.
Diffstat (limited to 'src')
-rw-r--r--src/compositor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor.c b/src/compositor.c
index a181fc6..3250559 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -833,7 +833,6 @@ weston_output_repaint(struct weston_output *output, int msecs)
pixman_region32_fini(&total_damage);
output->repaint_needed = 0;
- output->repaint_scheduled = 1;
wl_list_for_each_safe(cb, cnext, &output->frame_callback_list, link) {
wl_resource_post_event(&cb->resource, WL_CALLBACK_DONE, msecs);
@@ -852,6 +851,8 @@ idle_repaint(void *data)
/* An idle repaint may have been cancelled by vt switching away. */
if (output->repaint_needed)
weston_output_repaint(output, weston_compositor_get_time());
+ else
+ output->repaint_scheduled = 0;
}
WL_EXPORT void