summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Connor E <38229097+c-edw@users.noreply.github.com>2019-04-15 01:16:35 +0100
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-04-14 20:44:12 -0400
commitb2cfcebef61087f819b55d2f815e62aa4a6f1a52 (patch)
tree1336d7d187cccd3f7d92b4bc4749973117c642ea /sway
parentImplement input type configs (#3784) (diff)
downloadsway-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')
-rw-r--r--sway/commands.c4
-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
-rw-r--r--sway/meson.build2
-rw-r--r--sway/sway.5.scd6
6 files changed, 38 insertions, 9 deletions
diff --git a/sway/commands.c b/sway/commands.c
index abdaa3b8..d0bf402b 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -77,8 +77,8 @@ static struct cmd_handler handlers[] = {
77 { "input", cmd_input }, 77 { "input", cmd_input },
78 { "mode", cmd_mode }, 78 { "mode", cmd_mode },
79 { "mouse_warping", cmd_mouse_warping }, 79 { "mouse_warping", cmd_mouse_warping },
80 { "new_float", cmd_default_floating_border }, 80 { "new_float", cmd_new_float },
81 { "new_window", cmd_default_border }, 81 { "new_window", cmd_new_window },
82 { "no_focus", cmd_no_focus }, 82 { "no_focus", cmd_no_focus },
83 { "output", cmd_output }, 83 { "output", cmd_output },
84 { "popup_during_fullscreen", cmd_popup_during_fullscreen }, 84 { "popup_during_fullscreen", cmd_popup_during_fullscreen },
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
6struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) { 6struct 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
5struct 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
5struct 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}
diff --git a/sway/meson.build b/sway/meson.build
index 12b86efb..8254fb5c 100644
--- a/sway/meson.build
+++ b/sway/meson.build
@@ -73,6 +73,8 @@ sway_sources = files(
73 'commands/mode.c', 73 'commands/mode.c',
74 'commands/mouse_warping.c', 74 'commands/mouse_warping.c',
75 'commands/move.c', 75 'commands/move.c',
76 'commands/new_float.c',
77 'commands/new_window.c',
76 'commands/no_focus.c', 78 'commands/no_focus.c',
77 'commands/nop.c', 79 'commands/nop.c',
78 'commands/output.c', 80 'commands/output.c',
diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index 1650cd60..b484607a 100644
--- a/sway/sway.5.scd
+++ b/sway/sway.5.scd
@@ -529,12 +529,6 @@ The default colors are:
529 Whenever a window that matches _criteria_ appears, run list of commands. 529 Whenever a window that matches _criteria_ appears, run list of commands.
530 See *CRITERIA* for more details. 530 See *CRITERIA* for more details.
531 531
532*force_focus_wrapping* yes|no
533 This option is a wrapper to support i3's legacy syntax. _no_ is equivalent
534 to _focus_wrapping yes_ and _yes_ is equivalent to
535 _focus_wrapping force_. This is only available for convenience. Please
536 use _focus_wrapping_ instead when possible.
537
538*gaps* inner|outer|horizontal|vertical|top|right|bottom|left <amount> 532*gaps* inner|outer|horizontal|vertical|top|right|bottom|left <amount>
539 Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner 533 Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner
540 affects spacing around each view and outer affects the spacing around each 534 affects spacing around each view and outer affects the spacing around each