summaryrefslogtreecommitdiff
path: root/src/compositor-rdp.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-10-22 17:11:26 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-10-22 12:24:56 -0700
commit1edf44ce265d1b39c13c43d363972d5859d1018d (patch)
treec05e87ce038cd1f6f817a2d8f9edbc1fc2d79595 /src/compositor-rdp.c
parent3c688c5e33873100abab56735eb44f53eb3a6d6b (diff)
downloadweston-1edf44ce265d1b39c13c43d363972d5859d1018d.tar.gz
compositor: finish frame if redraw fails
If we are about to finish a frame, but a redraw is pending and we let the compositor redraw, we need to check for errors. If the redraw fails and the backend cannot schedule a page-flip, we need to finish the frame, anyway. All backends except DRM use a timer to schedule frames. Hence, they cannot fail. But for DRM, we need to be able to handle drmModePageFlip() failures in case access got revoked. This fixes a bug where logind+drm caused keyboard input to be missed as we didn't reenable it after a failed page-flip during deactivation.
Diffstat (limited to 'src/compositor-rdp.c')
-rw-r--r--src/compositor-rdp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 69f1d044..8a302f85 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -302,7 +302,7 @@ rdp_output_start_repaint_loop(struct weston_output *output)
weston_output_finish_frame(output, msec);
}
-static void
+static int
rdp_output_repaint(struct weston_output *output_base, pixman_region32_t *damage)
{
struct rdp_output *output = container_of(output_base, struct rdp_output, base);
@@ -324,6 +324,7 @@ rdp_output_repaint(struct weston_output *output_base, pixman_region32_t *damage)
&ec->primary_plane.damage, damage);
wl_event_source_timer_update(output->finish_frame_timer, 16);
+ return 0;
}
static void