aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorConnor E <38229097+c-edw@users.noreply.github.com>2019-04-15 01:16:35 +0100
committerBrian Ashworth <bosrsf04@gmail.com>2019-04-14 20:44:12 -0400
commitb2cfcebef61087f819b55d2f815e62aa4a6f1a52 (patch)
tree1336d7d187cccd3f7d92b4bc4749973117c642ea /sway/commands
parentbd3720585e91ae0dfcc4be30149ae4f8f5218174 (diff)
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.c9
-rw-r--r--sway/commands/new_float.c13
-rw-r--r--sway/commands/new_window.c13
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 @@
-#include <strings.h>
#include "sway/commands.h"
#include "sway/config.h"
+#include "log.h"
#include "util.h"
struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) {
+ sway_log(SWAY_INFO, "Warning: force_focus_wrapping is deprecated. "
+ "Use focus_wrapping instead.");
+ if (config->reading) {
+ config_add_swaynag_warning("force_focus_wrapping is deprecated. "
+ "Use focus_wrapping instead.");
+ }
+
struct cmd_results *error =
checkarg(argc, "force_focus_wrapping", EXPECTED_EQUAL_TO, 1);
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 @@
+#include "log.h"
+#include "sway/commands.h"
+#include "sway/config.h"
+
+struct cmd_results *cmd_new_float(int argc, char **argv) {
+ sway_log(SWAY_INFO, "Warning: new_float is deprecated. "
+ "Use default_floating_border instead.");
+ if (config->reading) {
+ config_add_swaynag_warning("new_float is deprecated. "
+ "Use default_floating_border instead.");
+ }
+ return cmd_default_floating_border(argc, argv);
+}
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 @@
+#include "log.h"
+#include "sway/commands.h"
+#include "sway/config.h"
+
+struct cmd_results *cmd_new_window(int argc, char **argv) {
+ sway_log(SWAY_INFO, "Warning: new_window is deprecated. "
+ "Use default_border instead.");
+ if (config->reading) {
+ config_add_swaynag_warning("new_window is deprecated. "
+ "Use default_border instead.");
+ }
+ return cmd_default_border(argc, argv);
+}