diff options
author | Tony Crisci <tony@dubstepdish.com> | 2016-07-27 23:16:58 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2016-07-27 23:16:58 -0400 |
commit | badfcf7c761c4bed5b60437d3dfd5eb5c5b0ce4c (patch) | |
tree | c167f4a884e478181130cc696517be8e0c8729c4 /sway | |
parent | Merge pull request #790 from acrisci/bug/switch-focus-workspace-output (diff) | |
download | sway-badfcf7c761c4bed5b60437d3dfd5eb5c5b0ce4c.tar.gz sway-badfcf7c761c4bed5b60437d3dfd5eb5c5b0ce4c.tar.zst sway-badfcf7c761c4bed5b60437d3dfd5eb5c5b0ce4c.zip |
Render focused stack/tab children focused
Whenever a stacked or tabbed container has focused, paint the titlebars of all
its child windows to be focused as well to indicate the parent stack/tab
container has the focus.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/border.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/border.c b/sway/border.c index 55628972..d17d8d0c 100644 --- a/sway/border.c +++ b/sway/border.c | |||
@@ -281,7 +281,9 @@ void update_tabbed_stacked_titlebars(swayc_t *c, cairo_t *cr, struct wlc_geometr | |||
281 | update_tabbed_stacked_titlebars(child, cr, g, focused, focused_inactive); | 281 | update_tabbed_stacked_titlebars(child, cr, g, focused, focused_inactive); |
282 | } | 282 | } |
283 | } else { | 283 | } else { |
284 | if (focused == c) { | 284 | bool is_child_of_focused = swayc_is_child_of(c, get_focused_container(&root_container)); |
285 | |||
286 | if (focused == c || is_child_of_focused) { | ||
285 | render_title_bar(c, cr, g, &config->border_colors.focused); | 287 | render_title_bar(c, cr, g, &config->border_colors.focused); |
286 | } else if (focused_inactive == c) { | 288 | } else if (focused_inactive == c) { |
287 | render_title_bar(c, cr, g, &config->border_colors.focused_inactive); | 289 | render_title_bar(c, cr, g, &config->border_colors.focused_inactive); |