swayfx/sway/tree
Hugo Osvaldo Barrera c16b2a26ed Avoid unecessary font metric calculations
Prior to 62d90a8e, titlebar's font height (and other related values)
would change any time any titlebar's content changed, so these values
were recalculated each time any titlebar's content changed (or a new
titlebar was created).

However, since the above was merge, these values no longer change so
often and we only need to recalculate them when the configured font
changes (and stop calling `config_update_font_height` each time
titlebars are rendered).

This commit removes all the unecessary calls to this function and avoids
all those unecessary calculations. Whenever the font strays from the
default value, the `font` command is called, and it calls
`config_update_font_height`, which is enough to keep the value always up
to date.

I've also added a default value to the `font_baseline` config, since
otherwise that's zero for setups that don't explicitly specify a font.
2021-09-20 09:25:47 +02:00
..
arrange.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
container.c Rename pango_printf to render_text 2021-09-13 14:22:51 +02:00
node.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
output.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
root.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
view.c Avoid unecessary font metric calculations 2021-09-20 09:25:47 +02:00
workspace.c Revert "Add workspace {prev,next}_on_output --create" 2021-06-22 19:00:31 +02:00