From 2acd67c142f740f63c3660c4ca1f7679991adde9 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Sat, 16 Jun 2012 08:51:21 +0200 Subject: [PATCH] Finish surface before calling destroy --- config.c | 2 +- page-widget.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.c b/config.c index cd60fa3..f15aa6f 100644 --- a/config.c +++ b/config.c @@ -110,7 +110,7 @@ config_load_default(zathura_t* zathura) girara_setting_add(gsession, "zoom-min", &int_value, INT, false, _("Zoom minimum"), NULL, NULL); int_value = 1000; girara_setting_add(gsession, "zoom-max", &int_value, INT, false, _("Zoom maximum"), NULL, NULL); - int_value = 5; + int_value = 20; girara_setting_add(gsession, "page-store-threshold", &int_value, INT, false, _("Life time (in seconds) of a hidden page"), NULL, NULL); girara_setting_add(gsession, "page-store-interval", &int_value, INT, true, _("Amount of seconds between each cache purge"), NULL, NULL); diff --git a/page-widget.c b/page-widget.c index 4734ff8..2c50ed7 100644 --- a/page-widget.c +++ b/page-widget.c @@ -483,6 +483,7 @@ zathura_page_widget_update_surface(ZathuraPage* widget, cairo_surface_t* surface zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget); g_static_mutex_lock(&(priv->lock)); if (priv->surface != NULL) { + cairo_surface_finish(priv->surface); cairo_surface_destroy(priv->surface); } priv->surface = surface;