mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 20:44:01 +01:00
Add deprecation warnings for new_float, new_window, and force_focus_wrapping.
This commit is contained in:
parent
bd3720585e
commit
b2cfcebef6
@ -147,6 +147,8 @@ sway_cmd cmd_mark;
|
||||
sway_cmd cmd_mode;
|
||||
sway_cmd cmd_mouse_warping;
|
||||
sway_cmd cmd_move;
|
||||
sway_cmd cmd_new_float;
|
||||
sway_cmd cmd_new_window;
|
||||
sway_cmd cmd_nop;
|
||||
sway_cmd cmd_opacity;
|
||||
sway_cmd cmd_new_float;
|
||||
|
@ -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 },
|
||||
|
@ -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) {
|
||||
|
13
sway/commands/new_float.c
Normal file
13
sway/commands/new_float.c
Normal file
@ -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);
|
||||
}
|
13
sway/commands/new_window.c
Normal file
13
sway/commands/new_window.c
Normal file
@ -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/mouse_warping.c',
|
||||
'commands/move.c',
|
||||
'commands/new_float.c',
|
||||
'commands/new_window.c',
|
||||
'commands/no_focus.c',
|
||||
'commands/nop.c',
|
||||
'commands/output.c',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user