Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
Correct interpretation of output rotation
Browse files Browse the repository at this point in the history
This fixes grim to treat the rotations as counterclockwise and applied
to the surface. This became necessary because wlroots recently corrected
its rotation similarly in swaywm/wlroots#2023.
  • Loading branch information
hedgepigdaniel authored and emersion committed Apr 21, 2020
1 parent 7a55773 commit 8f9d608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion render.c
Expand Up @@ -104,7 +104,7 @@ cairo_surface_t *render(struct grim_state *state, struct grim_box *geometry,
cairo_matrix_translate(&matrix,
(double)output->geometry.width / 2,
(double)output->geometry.height / 2);
cairo_matrix_rotate(&matrix, -get_output_rotation(output->transform));
cairo_matrix_rotate(&matrix, get_output_rotation(output->transform));
cairo_matrix_scale(&matrix,
(double)raw_output_width / output_width * output_flipped_x,
(double)raw_output_height / output_height * output_flipped_y);
Expand Down

0 comments on commit 8f9d608

Please sign in to comment.