From 4ca38b84ede12aed3c3b807521992b3580384f76 Mon Sep 17 00:00:00 2001 From: emersion Date: Sat, 20 Jan 2018 16:43:14 +0100 Subject: backend/drm: fix hardware cursors not moving This adds back `wlr_output::needs_swap`. This allows a backend to request buffer swaps even if the output isn't damaged. This is needed by the DRM backend to trigger pageflips when the cursor moves. --- include/wlr/interfaces/wlr_output.h | 1 + include/wlr/types/wlr_output.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include/wlr') diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index d5837def..56404ec7 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -32,5 +32,6 @@ void wlr_output_update_mode(struct wlr_output *output, void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, int32_t height, int32_t refresh); void wlr_output_update_enabled(struct wlr_output *output, bool enabled); +void wlr_output_update_needs_swap(struct wlr_output *output); #endif diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 1091ee62..33d27501 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -54,6 +54,7 @@ struct wlr_output { enum wl_output_subpixel subpixel; enum wl_output_transform transform; + bool needs_swap; pixman_region32_t damage, previous_damage; float transform_matrix[16]; @@ -64,8 +65,8 @@ struct wlr_output { int32_t refresh; // mHz struct { - struct wl_signal damage; struct wl_signal frame; + struct wl_signal needs_swap; struct wl_signal swap_buffers; struct wl_signal enable; struct wl_signal mode; -- cgit v1.2.3