aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-27 05:48:45 -0500
committerGitHub <noreply@github.com>2017-12-27 05:48:45 -0500
commit6c2242e66be2dddb38559717e1a9054a55b8e6d1 (patch)
tree64518dfcb1e7eb9696716869535aed9f05d7b27d /backend
parent47f9f91d157c9f650afe1172b3bb2d52def66a10 (diff)
parent43435d49150b87bbfafbae398dbde7ebfd9360dc (diff)
Merge pull request #522 from emersion/fix-drm-output-transform-cursor
Fix cursor on transformed output with DRM backend
Diffstat (limited to 'backend')
-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);