2018-10-07 21:40:05 +11:00
|
|
|
#include <strings.h>
|
|
|
|
#include "sway/commands.h"
|
|
|
|
#include "sway/config.h"
|
|
|
|
|
|
|
|
struct cmd_results *cmd_popup_during_fullscreen(int argc, char **argv) {
|
|
|
|
struct cmd_results *error = NULL;
|
|
|
|
if ((error = checkarg(argc, "popup_during_fullscreen",
|
|
|
|
EXPECTED_EQUAL_TO, 1))) {
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strcasecmp(argv[0], "smart") == 0) {
|
|
|
|
config->popup_during_fullscreen = POPUP_SMART;
|
|
|
|
} else if (strcasecmp(argv[0], "ignore") == 0) {
|
|
|
|
config->popup_during_fullscreen = POPUP_IGNORE;
|
|
|
|
} else if (strcasecmp(argv[0], "leave_fullscreen") == 0) {
|
|
|
|
config->popup_during_fullscreen = POPUP_LEAVE;
|
|
|
|
} else {
|
2019-01-11 10:27:21 +11:00
|
|
|
return cmd_results_new(CMD_INVALID, "Expected "
|
2018-10-07 21:40:05 +11:00
|
|
|
"'popup_during_fullscreen smart|ignore|leave_fullscreen'");
|
|
|
|
}
|
|
|
|
|
2019-01-11 10:27:21 +11:00
|
|
|
return cmd_results_new(CMD_SUCCESS, NULL);
|
2018-10-07 21:40:05 +11:00
|
|
|
}
|