diff options
author | Drew DeVault <[email protected]> | 2018-07-16 15:39:08 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-16 15:39:08 -0700 |
commit | d6bd314dffb7385eec73de40f0fdd5775cd5941b (patch) | |
tree | 1cec389e971cda3e42766c07789d0f51c2d39715 /sway/desktop/render.c | |
parent | 297e32126f1f8b27f51989b863e4ea1c9fce6a96 (diff) | |
parent | 255dc8bbb040c4f268f318bde86701227d82da3f (diff) |
Merge pull request #2276 from RyanDwyer/urgency
Implement urgency base functionality
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, struct wlr_texture *marks_texture; struct sway_container_state *state = &child->current; - if (state->focused || parent_focused) { + if (view_is_urgent(view)) { + colors = &config->border_colors.urgent; + title_texture = child->title_urgent; + marks_texture = view->marks_urgent; + } else if (state->focused || parent_focused) { colors = &config->border_colors.focused; title_texture = child->title_focused; marks_texture = view->marks_focused; @@ -607,8 +611,14 @@ static void render_container_tabbed(struct sway_output *output, struct border_colors *colors; struct wlr_texture *title_texture; struct wlr_texture *marks_texture; - - if (cstate->focused || parent_focused) { + bool urgent = view ? + view_is_urgent(view) : container_has_urgent_child(child); + + if (urgent) { + colors = &config->border_colors.urgent; + title_texture = child->title_urgent; + marks_texture = view ? view->marks_urgent : NULL; + } else if (cstate->focused || parent_focused) { colors = &config->border_colors.focused; title_texture = child->title_focused; marks_texture = view ? view->marks_focused : NULL; @@ -670,8 +680,14 @@ static void render_container_stacked(struct sway_output *output, struct border_colors *colors; struct wlr_texture *title_texture; struct wlr_texture *marks_texture; - - if (cstate->focused || parent_focused) { + bool urgent = view ? + view_is_urgent(view) : container_has_urgent_child(child); + + if (urgent) { + colors = &config->border_colors.urgent; + title_texture = child->title_urgent; + marks_texture = view ? view->marks_urgent : NULL; + } else if (cstate->focused || parent_focused) { colors = &config->border_colors.focused; title_texture = child->title_focused; marks_texture = view ? view->marks_focused : NULL; @@ -731,7 +747,11 @@ static void render_floating_container(struct sway_output *soutput, struct wlr_texture *title_texture; struct wlr_texture *marks_texture; - if (con->current.focused) { + if (view_is_urgent(view)) { + colors = &config->border_colors.urgent; + title_texture = con->title_urgent; + marks_texture = view->marks_urgent; + } else if (con->current.focused) { colors = &config->border_colors.focused; title_texture = con->title_focused; marks_texture = view->marks_focused; |