From af5f736277559398d3d3df20adbb3a90ff88dbd0 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 16 Jul 2018 18:22:27 +1000 Subject: Render containers as urgent if they have an urgent child --- sway/desktop/render.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sway/desktop') diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 3180f8ba..cb995215 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; -- cgit v1.2.3