diff options
author | Brian Ashworth <RedSoxFan@users.noreply.github.com> | 2018-10-08 15:28:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 15:28:09 -0400 |
commit | a999269e1cf8eeb423547a0c8ab3420f27628168 (patch) | |
tree | 3572a9e1bff58710c22638d85ce1206af3999d94 /sway/commands | |
parent | a03955f9368cfa1c190e4194eed8437dce22eb77 (diff) | |
parent | 3f328b62768d7801f0544b31ab8f9dde3014fd1d (diff) |
Merge pull request #2782 from RyanDwyer/popup-during-fullscreen
Implement popup_during_fullscreen
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/popup_during_fullscreen.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sway/commands/popup_during_fullscreen.c b/sway/commands/popup_during_fullscreen.c new file mode 100644 index 00000000..da1904b6 --- /dev/null +++ b/sway/commands/popup_during_fullscreen.c @@ -0,0 +1,25 @@ +#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 { + return cmd_results_new(CMD_INVALID, "popup_during_fullscreen", + "Expected " + "'popup_during_fullscreen smart|ignore|leave_fullscreen'"); + } + + return cmd_results_new(CMD_SUCCESS, NULL, NULL); +} |