aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index 406185e3..0d045ff4 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -418,9 +418,13 @@ static bool output_cursor_to_picture(struct wlr_x11_output *output,
float output_matrix[9];
wlr_matrix_identity(output_matrix);
if (output->wlr_output.transform != WL_OUTPUT_TRANSFORM_NORMAL) {
+ struct wlr_box tr_size = { .width = width, .height = height };
+ wlr_box_transform(&tr_size, &tr_size, output->wlr_output.transform, 0, 0);
+
wlr_matrix_translate(output_matrix, width / 2.0, height / 2.0);
wlr_matrix_transform(output_matrix, output->wlr_output.transform);
- wlr_matrix_translate(output_matrix, - width / 2.0, - height / 2.0);
+ wlr_matrix_translate(output_matrix,
+ - tr_size.width / 2.0, - tr_size.height / 2.0);
}
float matrix[9];