diff options
-rw-r--r-- | common/pango.c | 4 | ||||
-rw-r--r-- | sway/commands/reload.c | 1 | ||||
-rw-r--r-- | sway/commands/title_format.c | 1 | ||||
-rw-r--r-- | sway/config.c | 1 | ||||
-rw-r--r-- | sway/tree/view.c | 1 |
5 files changed, 2 insertions, 6 deletions
diff --git a/common/pango.c b/common/pango.c index 89b1ac41..abc18281 100644 --- a/common/pango.c +++ b/common/pango.c | |||
@@ -113,10 +113,8 @@ void get_text_metrics(const char *font, int *height, int *baseline) { | |||
113 | cairo_t *cairo = cairo_create(NULL); | 113 | cairo_t *cairo = cairo_create(NULL); |
114 | PangoContext *pango = pango_cairo_create_context(cairo); | 114 | PangoContext *pango = pango_cairo_create_context(cairo); |
115 | PangoFontDescription *description = pango_font_description_from_string(font); | 115 | PangoFontDescription *description = pango_font_description_from_string(font); |
116 | PangoFontMetrics *metrics; | ||
117 | |||
118 | // When passing NULL as a language, pango uses the current locale. | 116 | // When passing NULL as a language, pango uses the current locale. |
119 | metrics = pango_context_get_metrics(pango, description, NULL); | 117 | PangoFontMetrics *metrics = pango_context_get_metrics(pango, description, NULL); |
120 | 118 | ||
121 | *baseline = pango_font_metrics_get_ascent(metrics) / PANGO_SCALE; | 119 | *baseline = pango_font_metrics_get_ascent(metrics) / PANGO_SCALE; |
122 | *height = *baseline + pango_font_metrics_get_descent(metrics) / PANGO_SCALE; | 120 | *height = *baseline + pango_font_metrics_get_descent(metrics) / PANGO_SCALE; |
diff --git a/sway/commands/reload.c b/sway/commands/reload.c index 09ccd9d4..76f14bba 100644 --- a/sway/commands/reload.c +++ b/sway/commands/reload.c | |||
@@ -48,7 +48,6 @@ static void do_reload(void *data) { | |||
48 | } | 48 | } |
49 | list_free_items_and_destroy(bar_ids); | 49 | list_free_items_and_destroy(bar_ids); |
50 | 50 | ||
51 | config_update_font_height(); | ||
52 | root_for_each_container(rebuild_textures_iterator, NULL); | 51 | root_for_each_container(rebuild_textures_iterator, NULL); |
53 | 52 | ||
54 | arrange_root(); | 53 | arrange_root(); |
diff --git a/sway/commands/title_format.c b/sway/commands/title_format.c index 8d907e76..a2446b7e 100644 --- a/sway/commands/title_format.c +++ b/sway/commands/title_format.c | |||
@@ -23,6 +23,5 @@ struct cmd_results *cmd_title_format(int argc, char **argv) { | |||
23 | } | 23 | } |
24 | view->title_format = format; | 24 | view->title_format = format; |
25 | view_update_title(view, true); | 25 | view_update_title(view, true); |
26 | config_update_font_height(); | ||
27 | return cmd_results_new(CMD_SUCCESS, NULL); | 26 | return cmd_results_new(CMD_SUCCESS, NULL); |
28 | } | 27 | } |
diff --git a/sway/config.c b/sway/config.c index 1ddedc7e..6d0f465a 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -237,6 +237,7 @@ static void config_defaults(struct sway_config *config) { | |||
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 | 239 | config->font_height = 17; // height of monospace 10 |
240 | config->font_baseline = 11; // baselint of monospace 10 | ||
240 | config->urgent_timeout = 500; | 241 | config->urgent_timeout = 500; |
241 | config->focus_on_window_activation = FOWA_URGENT; | 242 | config->focus_on_window_activation = FOWA_URGENT; |
242 | config->popup_during_fullscreen = POPUP_SMART; | 243 | config->popup_during_fullscreen = POPUP_SMART; |
diff --git a/sway/tree/view.c b/sway/tree/view.c index ccb03088..b2f70d70 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -1280,7 +1280,6 @@ void view_update_title(struct sway_view *view, bool force) { | |||
1280 | view->container->title = NULL; | 1280 | view->container->title = NULL; |
1281 | view->container->formatted_title = NULL; | 1281 | view->container->formatted_title = NULL; |
1282 | } | 1282 | } |
1283 | config_update_font_height(); | ||
1284 | 1283 | ||
1285 | // Update title after the global font height is updated | 1284 | // Update title after the global font height is updated |
1286 | container_update_title_textures(view->container); | 1285 | container_update_title_textures(view->container); |