diff options
author | 2020-02-10 18:27:16 +0100 | |
---|---|---|
committer | 2020-02-17 21:47:36 +0100 | |
commit | ab00f7f3196554064a3012bcd2c68045f1b986bb (patch) | |
tree | 65c148ccee1417a108b6da50b2de0dca407aa262 | |
parent | Fix output transform anticlockwise (diff) | |
download | sway-ab00f7f3196554064a3012bcd2c68045f1b986bb.tar.gz sway-ab00f7f3196554064a3012bcd2c68045f1b986bb.tar.zst sway-ab00f7f3196554064a3012bcd2c68045f1b986bb.zip |
Fix output transform rotation direction
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: https://github.com/swaywm/wlroots/pull/2023
-rw-r--r-- | sway/commands/output/transform.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/output/transform.c b/sway/commands/output/transform.c index 2a3d1d4b..5e6efb5b 100644 --- a/sway/commands/output/transform.c +++ b/sway/commands/output/transform.c | |||
@@ -50,6 +50,10 @@ struct cmd_results *output_cmd_transform(int argc, char **argv) { | |||
50 | return cmd_results_new(CMD_INVALID, "Invalid output transform."); | 50 | return cmd_results_new(CMD_INVALID, "Invalid output transform."); |
51 | } | 51 | } |
52 | 52 | ||
53 | // Sway uses clockwise transforms, while WL_OUTPUT_TRANSFORM_* describe | ||
54 | // anti-clockwise transforms | ||
55 | transform = invert_rotation_direction(transform); | ||
56 | |||
53 | struct output_config *output = config->handler_context.output_config; | 57 | struct output_config *output = config->handler_context.output_config; |
54 | config->handler_context.leftovers.argc = argc - 1; | 58 | config->handler_context.leftovers.argc = argc - 1; |
55 | config->handler_context.leftovers.argv = argv + 1; | 59 | config->handler_context.leftovers.argv = argv + 1; |