diff options
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r-- | sway/tree/workspace.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index 2a2d834a..d71b0a53 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -11,6 +11,7 @@ #include "sway/ipc-server.h" #include "sway/tree/arrange.h" #include "sway/tree/container.h" +#include "sway/tree/view.h" #include "sway/tree/workspace.h" #include "list.h" #include "log.h" @@ -518,3 +519,12 @@ struct sway_container *workspace_output_get_highest_available( return NULL; } + +static bool find_urgent_iterator(struct sway_container *con, + void *data) { + return con->type == C_VIEW && view_is_urgent(con->sway_view); +} + +bool workspace_is_urgent(struct sway_container *workspace) { + return container_find(workspace, find_urgent_iterator, NULL); +} |