mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
Add deprecation warnings for new_float, new_window, and force_focus_wrapping.
This commit is contained in:
parent
bd3720585e
commit
b2cfcebef6
7 changed files with 40 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue