Add deprecation warnings for new_float, new_window, and force_focus_wrapping.

master
Connor E 6 years ago committed by Brian Ashworth
parent bd3720585e
commit b2cfcebef6

@ -147,6 +147,8 @@ sway_cmd cmd_mark;
sway_cmd cmd_mode; sway_cmd cmd_mode;
sway_cmd cmd_mouse_warping; sway_cmd cmd_mouse_warping;
sway_cmd cmd_move; sway_cmd cmd_move;
sway_cmd cmd_new_float;
sway_cmd cmd_new_window;
sway_cmd cmd_nop; sway_cmd cmd_nop;
sway_cmd cmd_opacity; sway_cmd cmd_opacity;
sway_cmd cmd_new_float; sway_cmd cmd_new_float;

@ -77,8 +77,8 @@ static struct cmd_handler handlers[] = {
{ "input", cmd_input }, { "input", cmd_input },
{ "mode", cmd_mode }, { "mode", cmd_mode },
{ "mouse_warping", cmd_mouse_warping }, { "mouse_warping", cmd_mouse_warping },
{ "new_float", cmd_default_floating_border }, { "new_float", cmd_new_float },
{ "new_window", cmd_default_border }, { "new_window", cmd_new_window },
{ "no_focus", cmd_no_focus }, { "no_focus", cmd_no_focus },
{ "output", cmd_output }, { "output", cmd_output },
{ "popup_during_fullscreen", cmd_popup_during_fullscreen }, { "popup_during_fullscreen", cmd_popup_during_fullscreen },

@ -1,9 +1,16 @@
#include <strings.h>
#include "sway/commands.h" #include "sway/commands.h"
#include "sway/config.h" #include "sway/config.h"
#include "log.h"
#include "util.h" #include "util.h"
struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) { 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 = struct cmd_results *error =
checkarg(argc, "force_focus_wrapping", EXPECTED_EQUAL_TO, 1); checkarg(argc, "force_focus_wrapping", EXPECTED_EQUAL_TO, 1);
if (error) { if (error) {

@ -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);
}

@ -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);
}

@ -73,6 +73,8 @@ sway_sources = files(
'commands/mode.c', 'commands/mode.c',
'commands/mouse_warping.c', 'commands/mouse_warping.c',
'commands/move.c', 'commands/move.c',
'commands/new_float.c',
'commands/new_window.c',
'commands/no_focus.c', 'commands/no_focus.c',
'commands/nop.c', 'commands/nop.c',
'commands/output.c', 'commands/output.c',

@ -529,12 +529,6 @@ The default colors are:
Whenever a window that matches _criteria_ appears, run list of commands. Whenever a window that matches _criteria_ appears, run list of commands.
See *CRITERIA* for more details. 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> *gaps* inner|outer|horizontal|vertical|top|right|bottom|left <amount>
Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner
affects spacing around each view and outer affects the spacing around each affects spacing around each view and outer affects the spacing around each

Loading…
Cancel
Save