2018-05-28 17:09:46 +02:00
|
|
|
#include <strings.h>
|
|
|
|
#include "sway/commands.h"
|
|
|
|
#include "sway/config.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) {
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
|
|
|
}
|