diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-30 10:27:16 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-01 23:14:58 +1000 |
commit | c9f8d35ca9b74dc7b059b097a6e55441d7405a77 (patch) | |
tree | 89eb0951deade3a3c6660a815fa633eb1760aa54 | |
parent | Fix floating position when view is floated when mapped (diff) | |
download | sway-c9f8d35ca9b74dc7b059b097a6e55441d7405a77.tar.gz sway-c9f8d35ca9b74dc7b059b097a6e55441d7405a77.tar.zst sway-c9f8d35ca9b74dc7b059b097a6e55441d7405a77.zip |
Consider floating views when calculating title height
-rw-r--r-- | sway/config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index cf05c236..14064cde 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "sway/config.h" | 26 | #include "sway/config.h" |
27 | #include "sway/tree/arrange.h" | 27 | #include "sway/tree/arrange.h" |
28 | #include "sway/tree/layout.h" | 28 | #include "sway/tree/layout.h" |
29 | #include "sway/tree/workspace.h" | ||
29 | #include "cairo.h" | 30 | #include "cairo.h" |
30 | #include "pango.h" | 31 | #include "pango.h" |
31 | #include "readline.h" | 32 | #include "readline.h" |
@@ -751,6 +752,16 @@ void config_update_font_height(bool recalculate) { | |||
751 | container_for_each_descendant_dfs(&root_container, | 752 | container_for_each_descendant_dfs(&root_container, |
752 | find_font_height_iterator, &recalculate); | 753 | find_font_height_iterator, &recalculate); |
753 | 754 | ||
755 | // Also consider floating views | ||
756 | for (int i = 0; i < root_container.children->length; ++i) { | ||
757 | struct sway_container *output = root_container.children->items[i]; | ||
758 | for (int j = 0; j < output->children->length; ++j) { | ||
759 | struct sway_container *ws = output->children->items[i]; | ||
760 | container_for_each_descendant_dfs(ws->sway_workspace->floating, | ||
761 | find_font_height_iterator, &recalculate); | ||
762 | } | ||
763 | } | ||
764 | |||
754 | if (config->font_height != prev_max_height) { | 765 | if (config->font_height != prev_max_height) { |
755 | arrange_root(); | 766 | arrange_root(); |
756 | } | 767 | } |