aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-17 14:20:42 +0100
committerBert <ber.t@gmx.com>2011-02-17 14:20:42 +0100
commit1c072cc0d0b06869630bc2d842a28a7899494de8 (patch)
treecc48f888353bf975536564623c238e65086ade27
parentb828b554191c761776e4757d1b92156c624c75f6 (diff)
Fill window before loading thumbs
-rw-r--r--main.c2
-rw-r--r--window.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 5b3bd33..7f5c453 100644
--- a/main.c
+++ b/main.c
@@ -138,6 +138,8 @@ int main(int argc, char **argv) {
if (options->thumbnails == 2) {
mode = MODE_THUMBS;
+ win_clear(&win);
+ win_draw(&win);
} else {
mode = MODE_NORMAL;
load_image();
diff --git a/window.c b/window.c
index 35a37fe..38501ca 100644
--- a/window.c
+++ b/window.c
@@ -239,14 +239,13 @@ void win_clear(win_t *win) {
return;
e = &win->env;
+ gcval.foreground = win->fullscreen ? BlackPixel(e->dpy, e->scr) : win->bgcol;
if (win->pm)
XFreePixmap(e->dpy, win->pm);
win->pm = XCreatePixmap(e->dpy, win->xwin, e->scrw, e->scrh, e->depth);
- gcval.foreground = win->fullscreen ? BlackPixel(e->dpy, e->scr) : win->bgcol;
XChangeGC(e->dpy, bgc, GCForeground, &gcval);
-
XFillRectangle(e->dpy, win->pm, bgc, 0, 0, e->scrw, e->scrh);
}