diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-09-02 23:29:26 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-09-02 23:29:26 +0200 |
commit | 262511aee51669b0f6a008eaf9a606b1f237602c (patch) | |
tree | ce4d9b232d3000e970490b0c7fe23ded1d05ecdf | |
parent | 3f38fadf49f910f74aa4d8eba8b106bbc8345de8 (diff) |
imlib.c: fill_text_bg: Simplify background initialization (patch by penma)
fixes valgrind warning about use of uninitialized values
-rw-r--r-- | src/imlib.c | 8 |
1 files 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) |