diff options
author | Simon Ser <contact@emersion.fr> | 2020-04-20 09:33:40 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-04-21 14:52:17 +0200 |
commit | 83d769805ccb3cef34e0e6167680aeb51ce034e9 (patch) | |
tree | 7c42c6f35851fa938d1db68b8f0e78ae0109dc89 /sway/commands | |
parent | 58eb0c408277af0013fb582803599ea811da3e88 (diff) |
Restrict relative output transforms to runtime changes
Prevent them from being used in the config file.
This is a breaking config file change.
References: https://github.com/swaywm/sway/issues/5236
Diffstat (limited to 'sway/commands')
-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 5e6efb5b..f4fcc8c9 100644 --- a/sway/commands/output/transform.c +++ b/sway/commands/output/transform.c @@ -59,6 +59,10 @@ struct cmd_results *output_cmd_transform(int argc, char **argv) { config->handler_context.leftovers.argv = argv + 1; if (argc > 1 && (strcmp(argv[1], "clockwise") == 0 || strcmp(argv[1], "anticlockwise") == 0)) { + if (config->reloading) { + return cmd_results_new(CMD_INVALID, + "Relative transforms cannot be used in the configuration file"); + } if (!sway_assert(output->name != NULL, "Output config name not set")) { return NULL; } |