From e737f65e38a8be7e9f5f1f82131699555aea81ff Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 26 Dec 2017 18:16:37 +0100 Subject: Fix cursor on transformed output with DRM backend --- backend/drm/drm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'backend/drm') 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); -- cgit v1.2.3