diff options
author | Vsevolod <kefirchik3@gmail.com> | 2021-12-10 17:09:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 16:09:29 +0100 |
commit | f7725011efd3bc2762a0d1002ea5071470962213 (patch) | |
tree | 1ae3ada1e24f387829958961c216b2c231fa01f7 /sway/desktop | |
parent | 3f58f12617ca4d6a311d060081e40bf01a73c239 (diff) | |
download | sway-f7725011efd3bc2762a0d1002ea5071470962213.tar.xz |
Add focused_tab_title
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/render.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 6c8c77ed..c088c936 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -762,6 +762,14 @@ static void render_containers_linear(struct sway_output *output, } } +static bool container_is_focused(struct sway_container *con, void *data) { + return con->current.focused; +} + +static bool container_has_focused_child(struct sway_container *con) { + return container_find_child(con, container_is_focused, NULL); +} + /** * Render a container's children using the L_TABBED layout. */ @@ -793,6 +801,10 @@ static void render_containers_tabbed(struct sway_output *output, colors = &config->border_colors.focused; title_texture = child->title_focused; marks_texture = child->marks_focused; + } else if (config->has_focused_tab_title && container_has_focused_child(child)) { + colors = &config->border_colors.focused_tab_title; + title_texture = child->title_focused_tab_title; + marks_texture = child->marks_focused_tab_title; } else if (child == parent->active_child) { colors = &config->border_colors.focused_inactive; title_texture = child->title_focused_inactive; @@ -858,7 +870,11 @@ static void render_containers_stacked(struct sway_output *output, colors = &config->border_colors.focused; title_texture = child->title_focused; marks_texture = child->marks_focused; - } else if (child == parent->active_child) { + } else if (config->has_focused_tab_title && container_has_focused_child(child)) { + colors = &config->border_colors.focused_tab_title; + title_texture = child->title_focused_tab_title; + marks_texture = child->marks_focused_tab_title; + } else if (child == parent->active_child) { colors = &config->border_colors.focused_inactive; title_texture = child->title_focused_inactive; marks_texture = child->marks_focused_inactive; |