diff options
author | 2019-04-15 01:16:35 +0100 | |
---|---|---|
committer | 2019-04-14 20:44:12 -0400 | |
commit | b2cfcebef61087f819b55d2f815e62aa4a6f1a52 (patch) | |
tree | 1336d7d187cccd3f7d92b4bc4749973117c642ea /sway/commands | |
parent | Implement input type configs (#3784) (diff) | |
download | sway-b2cfcebef61087f819b55d2f815e62aa4a6f1a52.tar.gz sway-b2cfcebef61087f819b55d2f815e62aa4a6f1a52.tar.zst sway-b2cfcebef61087f819b55d2f815e62aa4a6f1a52.zip |
Add deprecation warnings for new_float, new_window, and force_focus_wrapping.
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/force_focus_wrapping.c | 9 | ||||
-rw-r--r-- | sway/commands/new_float.c | 13 | ||||
-rw-r--r-- | sway/commands/new_window.c | 13 |
3 files changed, 34 insertions, 1 deletions
diff --git a/sway/commands/force_focus_wrapping.c b/sway/commands/force_focus_wrapping.c index e646ae9b..fafc1c3e 100644 --- a/sway/commands/force_focus_wrapping.c +++ b/sway/commands/force_focus_wrapping.c | |||
@@ -1,9 +1,16 @@ | |||
1 | #include <strings.h> | ||
2 | #include "sway/commands.h" | 1 | #include "sway/commands.h" |
3 | #include "sway/config.h" | 2 | #include "sway/config.h" |
3 | #include "log.h" | ||
4 | #include "util.h" | 4 | #include "util.h" |
5 | 5 | ||
6 | struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) { | 6 | struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) { |
7 | sway_log(SWAY_INFO, "Warning: force_focus_wrapping is deprecated. " | ||
8 | "Use focus_wrapping instead."); | ||
9 | if (config->reading) { | ||
10 | config_add_swaynag_warning("force_focus_wrapping is deprecated. " | ||
11 | "Use focus_wrapping instead."); | ||
12 | } | ||
13 | |||
7 | struct cmd_results *error = | 14 | struct cmd_results *error = |
8 | checkarg(argc, "force_focus_wrapping", EXPECTED_EQUAL_TO, 1); | 15 | checkarg(argc, "force_focus_wrapping", EXPECTED_EQUAL_TO, 1); |
9 | if (error) { | 16 | if (error) { |
diff --git a/sway/commands/new_float.c b/sway/commands/new_float.c new file mode 100644 index 00000000..4fedb4cb --- /dev/null +++ b/sway/commands/new_float.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include "log.h" | ||
2 | #include "sway/commands.h" | ||
3 | #include "sway/config.h" | ||
4 | |||
5 | struct cmd_results *cmd_new_float(int argc, char **argv) { | ||
6 | sway_log(SWAY_INFO, "Warning: new_float is deprecated. " | ||
7 | "Use default_floating_border instead."); | ||
8 | if (config->reading) { | ||
9 | config_add_swaynag_warning("new_float is deprecated. " | ||
10 | "Use default_floating_border instead."); | ||
11 | } | ||
12 | return cmd_default_floating_border(argc, argv); | ||
13 | } | ||
diff --git a/sway/commands/new_window.c b/sway/commands/new_window.c new file mode 100644 index 00000000..e8caa487 --- /dev/null +++ b/sway/commands/new_window.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include "log.h" | ||
2 | #include "sway/commands.h" | ||
3 | #include "sway/config.h" | ||
4 | |||
5 | struct cmd_results *cmd_new_window(int argc, char **argv) { | ||
6 | sway_log(SWAY_INFO, "Warning: new_window is deprecated. " | ||
7 | "Use default_border instead."); | ||
8 | if (config->reading) { | ||
9 | config_add_swaynag_warning("new_window is deprecated. " | ||
10 | "Use default_border instead."); | ||
11 | } | ||
12 | return cmd_default_border(argc, argv); | ||
13 | } | ||