swayfx/sway/commands
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
..
bar config: Fix swaybar pango_markup inconsistency 2021-06-03 14:18:23 +02:00
input Update wlr_box includes 2021-07-07 11:29:14 +02:00
output Add output modeline command 2021-08-31 17:29:40 +02:00
seat Only defer seat attachment during initial startup 2021-06-03 14:07:18 +02:00
assign.c
bar.c Prevent use-after-free on first bar subcommand error 2021-04-18 20:53:36 -07:00
bind.c cmd_bind_or_unbind_switch: fix copy/paste typo error message 2021-08-14 10:46:17 +02:00
border.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
client.c
create_output.c Implement create_output command for headless backend 2020-04-14 16:06:20 +02:00
default_border.c
default_floating_border.c
default_orientation.c
exec.c exec: fix validation during config reload 2020-08-24 09:41:54 +02:00
exec_always.c sway: commands: exec: restore SIGPIPE before exec:ing 2021-06-05 11:50:11 +02:00
exit.c
floating.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
floating_minmax_size.c
floating_modifier.c Add ability to remove the floating modifier 2020-01-20 09:19:04 -07:00
focus.c focus: beyond fullscreen when focused explicitly 2021-02-25 09:40:20 -05:00
focus_follows_mouse.c
focus_on_window_activation.c
focus_wrapping.c
font.c Use fixed titlebar heights 2021-08-26 20:16:14 +02:00
for_window.c
force_display_urgency_hint.c fix force_display_urgency_hint parsing 2020-08-03 15:39:48 +02:00
force_focus_wrapping.c
fullscreen.c cmd_fullscreen: ignore fullscreen request on workspaces 2021-05-10 10:30:44 +02:00
gaps.c Add gaps <type> <scope> toggle <px> command 2021-07-22 10:12:33 +02:00
hide_edge_borders.c
include.c
inhibit_idle.c
input.c Declare all struct cmd_handler arrays const 2021-02-04 09:49:06 +01:00
kill.c
layout.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
mark.c
max_render_time.c
mode.c Declare all struct cmd_handler arrays const 2021-02-04 09:49:06 +01:00
mouse_warping.c
move.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
new_float.c
new_window.c
no_focus.c
nop.c
opacity.c
output.c Add output modeline command 2021-08-31 17:29:40 +02:00
popup_during_fullscreen.c
reload.c Avoid unecessary font metric calculations 2021-09-20 09:25:47 +02:00
rename.c
resize.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
scratchpad.c Fix for_window criteria and mouse button bindings 2021-02-25 09:48:39 -05:00
seat.c Declare all struct cmd_handler arrays const 2021-02-04 09:49:06 +01:00
set.c
shortcuts_inhibitor.c commands: Add per-view shortcuts_inhibitor command 2020-05-13 21:22:16 -04:00
show_marks.c
smart_borders.c
smart_gaps.c
split.c commands: update split none command for a047b5ee4 2021-09-04 00:24:47 +02:00
sticky.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
swap.c container: Move pending state to state struct 2021-02-16 22:05:00 -05:00
swaybg_command.c
swaynag_command.c
tiling_drag.c
tiling_drag_threshold.c
title_align.c
title_format.c Avoid unecessary font metric calculations 2021-09-20 09:25:47 +02:00
titlebar_border_thickness.c
titlebar_padding.c
unmark.c Fix for_window criteria and mouse button bindings 2021-02-25 09:48:39 -05:00
urgent.c
workspace.c Revert "Add workspace {prev,next}_on_output --create" 2021-06-22 19:00:31 +02:00
workspace_layout.c
ws_auto_back_and_forth.c
xwayland.c