diff options
author | Hugo Osvaldo Barrera <hugo@barrera.io> | 2021-09-19 21:02:59 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-09-20 09:25:47 +0200 |
commit | a3451805200cd63ffe7478288a6d9b410cdaee35 (patch) | |
tree | 9131adc1c60b4675f906cd683001ef7ab43b9aac | |
parent | Avoid unecessary font metric calculations (diff) | |
download | sway-a3451805200cd63ffe7478288a6d9b410cdaee35.tar.gz sway-a3451805200cd63ffe7478288a6d9b410cdaee35.tar.zst sway-a3451805200cd63ffe7478288a6d9b410cdaee35.zip |
Drop hardcoded font metric values
-rw-r--r-- | sway/config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c index 6d0f465a..e3daacda 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -236,8 +236,6 @@ static void config_defaults(struct sway_config *config) { | |||
236 | config->default_layout = L_NONE; | 236 | config->default_layout = L_NONE; |
237 | config->default_orientation = L_NONE; | 237 | config->default_orientation = L_NONE; |
238 | if (!(config->font = strdup("monospace 10"))) goto cleanup; | 238 | if (!(config->font = strdup("monospace 10"))) goto cleanup; |
239 | config->font_height = 17; // height of monospace 10 | ||
240 | config->font_baseline = 11; // baselint of monospace 10 | ||
241 | config->urgent_timeout = 500; | 239 | config->urgent_timeout = 500; |
242 | config->focus_on_window_activation = FOWA_URGENT; | 240 | config->focus_on_window_activation = FOWA_URGENT; |
243 | config->popup_during_fullscreen = POPUP_SMART; | 241 | config->popup_during_fullscreen = POPUP_SMART; |
@@ -542,6 +540,9 @@ bool load_main_config(const char *file, bool is_active, bool validating) { | |||
542 | return success; | 540 | return success; |
543 | } | 541 | } |
544 | 542 | ||
543 | // Only really necessary if not explicitly `font` is set in the config. | ||
544 | config_update_font_height(); | ||
545 | |||
545 | if (is_active && !validating) { | 546 | if (is_active && !validating) { |
546 | input_manager_verify_fallback_seat(); | 547 | input_manager_verify_fallback_seat(); |
547 | 548 | ||