compositor: finish frame if redraw fails
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 22 Oct 2013 15:11:26 +0000 (17:11 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 22 Oct 2013 19:24:56 +0000 (12:24 -0700)
commit1edf44ce265d1b39c13c43d363972d5859d1018d
treec05e87ce038cd1f6f817a2d8f9edbc1fc2d79595
parent3c688c5e33873100abab56735eb44f53eb3a6d6b
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.
src/compositor-drm.c
src/compositor-fbdev.c
src/compositor-headless.c
src/compositor-rdp.c
src/compositor-rpi.c
src/compositor-wayland.c
src/compositor-x11.c
src/compositor.c
src/compositor.h