diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 4 | ||||
-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 | ||||
-rw-r--r-- | sway/meson.build | 2 | ||||
-rw-r--r-- | sway/sway.5.scd | 6 |
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[] = { { "input", cmd_input }, { "mode", cmd_mode }, { "mouse_warping", cmd_mouse_warping }, - { "new_float", cmd_default_floating_border }, - { "new_window", cmd_default_border }, + { "new_float", cmd_new_float }, + { "new_window", cmd_new_window }, { "no_focus", cmd_no_focus }, { "output", cmd_output }, { "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 @@ -#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); +} 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( 'commands/mode.c', 'commands/mouse_warping.c', 'commands/move.c', + 'commands/new_float.c', + 'commands/new_window.c', 'commands/no_focus.c', 'commands/nop.c', '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: Whenever a window that matches _criteria_ appears, run list of commands. See *CRITERIA* for more details. -*force_focus_wrapping* yes|no - This option is a wrapper to support i3's legacy syntax. _no_ is equivalent - to _focus_wrapping yes_ and _yes_ is equivalent to - _focus_wrapping force_. This is only available for convenience. Please - use _focus_wrapping_ instead when possible. - *gaps* inner|outer|horizontal|vertical|top|right|bottom|left <amount> Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner affects spacing around each view and outer affects the spacing around each |