aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-20 16:43:14 +0100
committeremersion <contact@emersion.fr>2018-01-20 16:43:14 +0100
commit4ca38b84ede12aed3c3b807521992b3580384f76 (patch)
tree67b2fac5e71bcc97af390fca94dbff3416b8f809 /backend
parentbc001e90e988c965776abbd078224c14ac296047 (diff)
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.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index e6bfee8c..72acbeab 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -619,7 +619,11 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output,
gbm_bo_unmap(bo, bo_data);
- return drm->iface->crtc_set_cursor(drm, crtc, bo);
+ bool ok = drm->iface->crtc_set_cursor(drm, crtc, bo);
+ if (ok) {
+ wlr_output_update_needs_swap(output);
+ }
+ return ok;
}
static bool wlr_drm_connector_move_cursor(struct wlr_output *output,
@@ -643,8 +647,12 @@ static bool wlr_drm_connector_move_cursor(struct wlr_output *output,
transformed_box.y -= plane->cursor_hotspot_y;
}
- return drm->iface->crtc_move_cursor(drm, conn->crtc, transformed_box.x,
+ bool ok = drm->iface->crtc_move_cursor(drm, conn->crtc, transformed_box.x,
transformed_box.y);
+ if (ok) {
+ wlr_output_update_needs_swap(output);
+ }
+ return ok;
}
static void wlr_drm_connector_destroy(struct wlr_output *output) {