2018-05-28 17:09:46 +02:00
|
|
|
#include "sway/commands.h"
|
|
|
|
#include "sway/config.h"
|
2019-04-15 02:16:35 +02:00
|
|
|
#include "log.h"
|
2018-07-23 21:04:46 +02:00
|
|
|
#include "util.h"
|
2018-05-28 17:09:46 +02:00
|
|
|
|
|
|
|
struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) {
|
2019-04-15 02:16:35 +02:00
|
|
|
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.");
|
|
|
|
}
|
|
|
|
|
2018-05-28 17:09:46 +02:00
|
|
|
struct cmd_results *error =
|
|
|
|
checkarg(argc, "force_focus_wrapping", EXPECTED_EQUAL_TO, 1);
|
|
|
|
if (error) {
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
2018-07-23 21:04:46 +02:00
|
|
|
if (parse_boolean(argv[0], config->focus_wrapping == WRAP_FORCE)) {
|
2018-05-28 17:09:46 +02:00
|
|
|
config->focus_wrapping = WRAP_FORCE;
|
|
|
|
} else {
|
2018-07-23 21:04:46 +02:00
|
|
|
config->focus_wrapping = WRAP_YES;
|
2018-05-28 17:09:46 +02:00
|
|
|
}
|
|
|
|
|
2019-01-11 00:27:21 +01:00
|
|
|
return cmd_results_new(CMD_SUCCESS, NULL);
|
2018-05-28 17:09:46 +02:00
|
|
|
}
|