summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-02 23:29:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-02 23:29:26 +0200
commit262511aee51669b0f6a008eaf9a606b1f237602c (patch)
treece4d9b232d3000e970490b0c7fe23ded1d05ecdf /src
parent3f38fadf49f910f74aa4d8eba8b106bbc8345de8 (diff)
imlib.c: fill_text_bg: Simplify background initialization (patch by penma)
fixes valgrind warning about use of uninitialized values
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c8
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)