1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 14:53:52 +01:00

Merge pull request #2799 from ianyfan/commands

commands: when setting urgency, check container is not null
This commit is contained in:
emersion 2018-10-08 19:17:40 +02:00 committed by GitHub
commit a03955f936
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -12,6 +12,9 @@ struct cmd_results *cmd_urgent(int argc, char **argv) {
return error;
}
struct sway_container *container = config->handler_context.container;
if (!container) {
return cmd_results_new(CMD_FAILURE, "urgent", "No current container");
}
if (!container->view) {
return cmd_results_new(CMD_INVALID, "urgent",
"Only views can be urgent");