mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-27 21:58:16 +01:00
commands: when setting urgency, check container is not null
This commit is contained in:
parent
16e727a654
commit
efb123899f
1 changed files with 3 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue