From 262511aee51669b0f6a008eaf9a606b1f237602c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 2 Sep 2011 23:29:26 +0200 Subject: imlib.c: fill_text_bg: Simplify background initialization (patch by penma) fixes valgrind warning about use of uninitialized values --- src/imlib.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/imlib.c b/src/imlib.c index b1a3ee0..45de85c 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -321,18 +321,16 @@ char *feh_http_load_image(char *url) void feh_imlib_image_fill_text_bg(Imlib_Image im, int w, int h) { - static DATA8 atab[256]; - memset(atab, 0, sizeof(atab)); - gib_imlib_image_set_has_alpha(im, 1); - gib_imlib_apply_color_modifier_to_rectangle(im, 0, 0, w, h, NULL, NULL, - NULL, atab); + imlib_context_set_blend(0); if (opt.text_bg == TEXT_BG_CLEAR) gib_imlib_image_fill_rectangle(im, 0, 0, w, h, 0, 0, 0, 0); else gib_imlib_image_fill_rectangle(im, 0, 0, w, h, 0, 0, 0, 127); + + imlib_context_set_blend(1); } static Imlib_Font feh_load_font(winwidget w) -- cgit v1.2.3