aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-07-16 18:22:27 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-07-16 18:22:27 +1000
commitaf5f736277559398d3d3df20adbb3a90ff88dbd0 (patch)
tree10c71509533639ec30cae568b067d9c159c5bb58
parentbe28c18ad5a3271aad537a5356662d57f16d9703 (diff)
downloadsway-af5f736277559398d3d3df20adbb3a90ff88dbd0.zip
sway-af5f736277559398d3d3df20adbb3a90ff88dbd0.tar.gz
sway-af5f736277559398d3d3df20adbb3a90ff88dbd0.tar.bz2
Render containers as urgent if they have an urgent child
-rw-r--r--sway/desktop/render.c12
-rw-r--r--sway/tree/workspace.c1
2 files changed, 9 insertions, 4 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 3180f8b..cb99521 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -611,11 +611,13 @@ static void render_container_tabbed(struct sway_output *output,
struct border_colors *colors;
struct wlr_texture *title_texture;
struct wlr_texture *marks_texture;
+ bool urgent = view ?
+ view_is_urgent(view) : container_has_urgent_child(child);
- if (view && view_is_urgent(view)) {
+ if (urgent) {
colors = &config->border_colors.urgent;
title_texture = child->title_urgent;
- marks_texture = view->marks_urgent;
+ marks_texture = view ? view->marks_urgent : NULL;
} else if (cstate->focused || parent_focused) {
colors = &config->border_colors.focused;
title_texture = child->title_focused;
@@ -678,11 +680,13 @@ static void render_container_stacked(struct sway_output *output,
struct border_colors *colors;
struct wlr_texture *title_texture;
struct wlr_texture *marks_texture;
+ bool urgent = view ?
+ view_is_urgent(view) : container_has_urgent_child(child);
- if (view && view_is_urgent(view)) {
+ if (urgent) {
colors = &config->border_colors.urgent;
title_texture = child->title_urgent;
- marks_texture = view->marks_urgent;
+ marks_texture = view ? view->marks_urgent : NULL;
} else if (cstate->focused || parent_focused) {
colors = &config->border_colors.focused;
title_texture = child->title_focused;
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 00b479e..622f01e 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -526,5 +526,6 @@ void workspace_detect_urgent(struct sway_container *workspace) {
if (workspace->sway_workspace->urgent != new_urgent) {
workspace->sway_workspace->urgent = new_urgent;
ipc_event_workspace(NULL, workspace, "urgent");
+ container_damage_whole(workspace);
}
}