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.
diff --git a/src/compositor.h b/src/compositor.h
index 5ed348b..891e7e4 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -219,7 +219,7 @@
 	struct wl_list mode_list;
 
 	void (*start_repaint_loop)(struct weston_output *output);
-	void (*repaint)(struct weston_output *output,
+	int (*repaint)(struct weston_output *output,
 			pixman_region32_t *damage);
 	void (*destroy)(struct weston_output *output);
 	void (*assign_planes)(struct weston_output *output);