From dafe7eac742301952c088d68a455586b0225a7bd Mon Sep 17 00:00:00 2001 From: Bert Date: Fri, 25 Feb 2011 12:08:12 +0100 Subject: Refactored imlib context handling --- thumbs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'thumbs.c') diff --git a/thumbs.c b/thumbs.c index 89f48ff..e60bdc7 100644 --- a/thumbs.c +++ b/thumbs.c @@ -79,10 +79,13 @@ void tns_load(tns_t *tns, win_t *win, const char *filename) { t->pm = win_create_pixmap(win, t->w, t->h); imlib_context_set_drawable(t->pm); + imlib_context_set_anti_alias(1); imlib_render_image_part_on_drawable_at_size(0, 0, w, h, 0, 0, t->w, t->h); - imlib_free_image(); tns->dirty = 1; + + if (im) + imlib_free_image(); } void tns_check_view(tns_t *tns, Bool scrolled) { -- cgit v1.2.3-54-g00ecf