diff options
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 17fe823a..cb995215 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -553,7 +553,11 @@ static void render_container_simple(struct sway_output *output, | |||
553 | struct wlr_texture *marks_texture; | 553 | struct wlr_texture *marks_texture; |
554 | struct sway_container_state *state = &child->current; | 554 | struct sway_container_state *state = &child->current; |
555 | 555 | ||
556 | if (state->focused || parent_focused) { | 556 | if (view_is_urgent(view)) { |
557 | colors = &config->border_colors.urgent; | ||
558 | title_texture = child->title_urgent; | ||
559 | marks_texture = view->marks_urgent; | ||
560 | } else if (state->focused || parent_focused) { | ||
557 | colors = &config->border_colors.focused; | 561 | colors = &config->border_colors.focused; |
558 | title_texture = child->title_focused; | 562 | title_texture = child->title_focused; |
559 | marks_texture = view->marks_focused; | 563 | marks_texture = view->marks_focused; |
@@ -607,8 +611,14 @@ static void render_container_tabbed(struct sway_output *output, | |||
607 | struct border_colors *colors; | 611 | struct border_colors *colors; |
608 | struct wlr_texture *title_texture; | 612 | struct wlr_texture *title_texture; |
609 | struct wlr_texture *marks_texture; | 613 | struct wlr_texture *marks_texture; |
610 | 614 | bool urgent = view ? | |
611 | if (cstate->focused || parent_focused) { | 615 | view_is_urgent(view) : container_has_urgent_child(child); |
616 | |||
617 | if (urgent) { | ||
618 | colors = &config->border_colors.urgent; | ||
619 | title_texture = child->title_urgent; | ||
620 | marks_texture = view ? view->marks_urgent : NULL; | ||
621 | } else if (cstate->focused || parent_focused) { | ||
612 | colors = &config->border_colors.focused; | 622 | colors = &config->border_colors.focused; |
613 | title_texture = child->title_focused; | 623 | title_texture = child->title_focused; |
614 | marks_texture = view ? view->marks_focused : NULL; | 624 | marks_texture = view ? view->marks_focused : NULL; |
@@ -670,8 +680,14 @@ static void render_container_stacked(struct sway_output *output, | |||
670 | struct border_colors *colors; | 680 | struct border_colors *colors; |
671 | struct wlr_texture *title_texture; | 681 | struct wlr_texture *title_texture; |
672 | struct wlr_texture *marks_texture; | 682 | struct wlr_texture *marks_texture; |
673 | 683 | bool urgent = view ? | |
674 | if (cstate->focused || parent_focused) { | 684 | view_is_urgent(view) : container_has_urgent_child(child); |
685 | |||
686 | if (urgent) { | ||
687 | colors = &config->border_colors.urgent; | ||
688 | title_texture = child->title_urgent; | ||
689 | marks_texture = view ? view->marks_urgent : NULL; | ||
690 | } else if (cstate->focused || parent_focused) { | ||
675 | colors = &config->border_colors.focused; | 691 | colors = &config->border_colors.focused; |
676 | title_texture = child->title_focused; | 692 | title_texture = child->title_focused; |
677 | marks_texture = view ? view->marks_focused : NULL; | 693 | marks_texture = view ? view->marks_focused : NULL; |
@@ -731,7 +747,11 @@ static void render_floating_container(struct sway_output *soutput, | |||
731 | struct wlr_texture *title_texture; | 747 | struct wlr_texture *title_texture; |
732 | struct wlr_texture *marks_texture; | 748 | struct wlr_texture *marks_texture; |
733 | 749 | ||
734 | if (con->current.focused) { | 750 | if (view_is_urgent(view)) { |
751 | colors = &config->border_colors.urgent; | ||
752 | title_texture = con->title_urgent; | ||
753 | marks_texture = view->marks_urgent; | ||
754 | } else if (con->current.focused) { | ||
735 | colors = &config->border_colors.focused; | 755 | colors = &config->border_colors.focused; |
736 | title_texture = con->title_focused; | 756 | title_texture = con->title_focused; |
737 | marks_texture = view->marks_focused; | 757 | marks_texture = view->marks_focused; |