aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-12-26 18:16:37 +0100
committeremersion <contact@emersion.fr>2017-12-26 18:16:37 +0100
commite737f65e38a8be7e9f5f1f82131699555aea81ff (patch)
tree0c3519bcbbc3d65e226b3deb075f730e751d7c9b /backend/drm
parent4d744aeb230f36d990c102a89314f95ff802ca75 (diff)
Fix cursor on transformed output with DRM backend
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 06f012a3..dd5c97f5 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -543,10 +543,11 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output,
// OpenGL will read the pixels out upside down,
// so we need to flip the image vertically
+ enum wl_output_transform transform = wlr_output_transform_compose(
+ wlr_output_transform_invert(output->transform),
+ WL_OUTPUT_TRANSFORM_FLIPPED_180);
wlr_matrix_texture(plane->matrix, plane->surf.width, plane->surf.height,
- conn->output.transform ^ WL_OUTPUT_TRANSFORM_FLIPPED_180);
-
- // TODO the image needs to be rotated depending on the output rotation
+ transform);
plane->wlr_tex =
wlr_render_texture_create(plane->surf.renderer->wlr_rend);