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 | Fixup headless output names (diff) | |
download | sway-f7725011efd3bc2762a0d1002ea5071470962213.tar.gz sway-f7725011efd3bc2762a0d1002ea5071470962213.tar.zst sway-f7725011efd3bc2762a0d1002ea5071470962213.zip |
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, | |||
762 | } | 762 | } |
763 | } | 763 | } |
764 | 764 | ||
765 | static bool container_is_focused(struct sway_container *con, void *data) { | ||
766 | return con->current.focused; | ||
767 | } | ||
768 | |||
769 | static bool container_has_focused_child(struct sway_container *con) { | ||
770 | return container_find_child(con, container_is_focused, NULL); | ||
771 | } | ||
772 | |||
765 | /** | 773 | /** |
766 | * Render a container's children using the L_TABBED layout. | 774 | * Render a container's children using the L_TABBED layout. |
767 | */ | 775 | */ |
@@ -793,6 +801,10 @@ static void render_containers_tabbed(struct sway_output *output, | |||
793 | colors = &config->border_colors.focused; | 801 | colors = &config->border_colors.focused; |
794 | title_texture = child->title_focused; | 802 | title_texture = child->title_focused; |
795 | marks_texture = child->marks_focused; | 803 | marks_texture = child->marks_focused; |
804 | } else if (config->has_focused_tab_title && container_has_focused_child(child)) { | ||
805 | colors = &config->border_colors.focused_tab_title; | ||
806 | title_texture = child->title_focused_tab_title; | ||
807 | marks_texture = child->marks_focused_tab_title; | ||
796 | } else if (child == parent->active_child) { | 808 | } else if (child == parent->active_child) { |
797 | colors = &config->border_colors.focused_inactive; | 809 | colors = &config->border_colors.focused_inactive; |
798 | title_texture = child->title_focused_inactive; | 810 | title_texture = child->title_focused_inactive; |
@@ -858,7 +870,11 @@ static void render_containers_stacked(struct sway_output *output, | |||
858 | colors = &config->border_colors.focused; | 870 | colors = &config->border_colors.focused; |
859 | title_texture = child->title_focused; | 871 | title_texture = child->title_focused; |
860 | marks_texture = child->marks_focused; | 872 | marks_texture = child->marks_focused; |
861 | } else if (child == parent->active_child) { | 873 | } else if (config->has_focused_tab_title && container_has_focused_child(child)) { |
874 | colors = &config->border_colors.focused_tab_title; | ||
875 | title_texture = child->title_focused_tab_title; | ||
876 | marks_texture = child->marks_focused_tab_title; | ||
877 | } else if (child == parent->active_child) { | ||
862 | colors = &config->border_colors.focused_inactive; | 878 | colors = &config->border_colors.focused_inactive; |
863 | title_texture = child->title_focused_inactive; | 879 | title_texture = child->title_focused_inactive; |
864 | marks_texture = child->marks_focused_inactive; | 880 | marks_texture = child->marks_focused_inactive; |