diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index f7ff49b3..e99a3458 100644 --- a/sway/config.c +++ b/sway/config.c @@ -82,6 +82,12 @@ static void free_mode(struct sway_mode *mode) { } list_free(mode->switch_bindings); } + if (mode->gesture_bindings) { + for (int i = 0; i < mode->gesture_bindings->length; i++) { + free_gesture_binding(mode->gesture_bindings->items[i]); + } + list_free(mode->gesture_bindings); + } free(mode); } @@ -222,6 +228,7 @@ static void config_defaults(struct sway_config *config) { if (!(config->current_mode->keycode_bindings = create_list())) goto cleanup; if (!(config->current_mode->mouse_bindings = create_list())) goto cleanup; if (!(config->current_mode->switch_bindings = create_list())) goto cleanup; + if (!(config->current_mode->gesture_bindings = create_list())) goto cleanup; list_add(config->modes, config->current_mode); config->floating_mod = 0; @@ -236,6 +243,7 @@ static void config_defaults(struct sway_config *config) { config->default_layout = L_NONE; config->default_orientation = L_NONE; if (!(config->font = strdup("monospace 10"))) goto cleanup; + config->font_description = pango_font_description_from_string(config->font); config->urgent_timeout = 500; config->focus_on_window_activation = FOWA_URGENT; config->popup_during_fullscreen = POPUP_SMART; @@ -1005,7 +1013,7 @@ int workspace_output_cmp_workspace(const void *a, const void *b) { void config_update_font_height(void) { int prev_max_height = config->font_height; - get_text_metrics(config->font, &config->font_height, &config->font_baseline); + get_text_metrics(config->font_description, &config->font_height, &config->font_baseline); if (config->font_height != prev_max_height) { arrange_root(); |