diff options
Diffstat (limited to 'sway/commands/urgent.c')
-rw-r--r-- | sway/commands/urgent.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/urgent.c b/sway/commands/urgent.c index bccb33fe..53c37d4d 100644 --- a/sway/commands/urgent.c +++ b/sway/commands/urgent.c | |||
@@ -11,13 +11,12 @@ struct cmd_results *cmd_urgent(int argc, char **argv) { | |||
11 | if ((error = checkarg(argc, "urgent", EXPECTED_EQUAL_TO, 1))) { | 11 | if ((error = checkarg(argc, "urgent", EXPECTED_EQUAL_TO, 1))) { |
12 | return error; | 12 | return error; |
13 | } | 13 | } |
14 | struct sway_container *container = | 14 | struct sway_container *container = config->handler_context.container; |
15 | config->handler_context.current_container; | 15 | if (!container->view) { |
16 | if (container->type != C_VIEW) { | ||
17 | return cmd_results_new(CMD_INVALID, "urgent", | 16 | return cmd_results_new(CMD_INVALID, "urgent", |
18 | "Only views can be urgent"); | 17 | "Only views can be urgent"); |
19 | } | 18 | } |
20 | struct sway_view *view = container->sway_view; | 19 | struct sway_view *view = container->view; |
21 | 20 | ||
22 | if (strcmp(argv[0], "allow") == 0) { | 21 | if (strcmp(argv[0], "allow") == 0) { |
23 | view->allow_request_urgent = true; | 22 | view->allow_request_urgent = true; |