summaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/thumbs.c b/thumbs.c
index 5895c99..5708651 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -176,6 +176,7 @@ void tns_init(tns_t *tns, int cnt) {
tns->cnt = tns->first = tns->sel = 0;
tns->cap = cnt;
+ tns->alpha = 1;
tns->dirty = 0;
if ((homedir = getenv("HOME"))) {
@@ -335,6 +336,10 @@ void tns_render(tns_t *tns, win_t *win) {
t->x = x + (THUMB_SIZE - t->w) / 2;
t->y = y + (THUMB_SIZE - t->h) / 2;
imlib_context_set_image(t->im);
+
+ if (imlib_image_has_alpha() && !tns->alpha)
+ win_draw_rect(win, win->pm, t->x, t->y, t->w, t->h, True, 0, win->white);
+
imlib_render_image_part_on_drawable_at_size(0, 0, t->w, t->h,
t->x, t->y, t->w, t->h);
if ((i + 1) % tns->cols == 0) {