Skip to content

Commit

Permalink
Fix output transform rotation direction
Browse files Browse the repository at this point in the history
This patch makes it so users that have configured their screen with a
transform don't have to update their config after the wlroots breaking
change.

References: swaywm/wlroots#2023
  • Loading branch information
emersion authored and ddevault committed Feb 17, 2020
1 parent a5a4d32 commit ab00f7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sway/commands/output/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ struct cmd_results *output_cmd_transform(int argc, char **argv) {
return cmd_results_new(CMD_INVALID, "Invalid output transform.");
}

// Sway uses clockwise transforms, while WL_OUTPUT_TRANSFORM_* describe
// anti-clockwise transforms
transform = invert_rotation_direction(transform);

struct output_config *output = config->handler_context.output_config;
config->handler_context.leftovers.argc = argc - 1;
config->handler_context.leftovers.argv = argv + 1;
Expand Down

0 comments on commit ab00f7f

Please sign in to comment.