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 | 9119f876552a47716bd317524bf5d786f909e5e5 (diff) |
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 @@ #include "sway/config.h" #include "sway/tree/arrange.h" #include "sway/tree/layout.h" +#include "sway/tree/workspace.h" #include "cairo.h" #include "pango.h" #include "readline.h" @@ -751,6 +752,16 @@ void config_update_font_height(bool recalculate) { container_for_each_descendant_dfs(&root_container, find_font_height_iterator, &recalculate); + // Also consider floating views + for (int i = 0; i < root_container.children->length; ++i) { + struct sway_container *output = root_container.children->items[i]; + for (int j = 0; j < output->children->length; ++j) { + struct sway_container *ws = output->children->items[i]; + container_for_each_descendant_dfs(ws->sway_workspace->floating, + find_font_height_iterator, &recalculate); + } + } + if (config->font_height != prev_max_height) { arrange_root(); } |