Ver código fonte

Fill window before loading thumbs

master
Bert 13 anos atrás
pai
commit
1c072cc0d0
2 arquivos alterados com 3 adições e 2 exclusões
  1. +2
    -0
      main.c
  2. +1
    -2
      window.c

+ 2
- 0
main.c Ver arquivo

@@ -138,6 +138,8 @@ int main(int argc, char **argv) {


if (options->thumbnails == 2) { if (options->thumbnails == 2) {
mode = MODE_THUMBS; mode = MODE_THUMBS;
win_clear(&win);
win_draw(&win);
} else { } else {
mode = MODE_NORMAL; mode = MODE_NORMAL;
load_image(); load_image();


+ 1
- 2
window.c Ver arquivo

@@ -239,14 +239,13 @@ void win_clear(win_t *win) {
return; return;


e = &win->env; e = &win->env;
gcval.foreground = win->fullscreen ? BlackPixel(e->dpy, e->scr) : win->bgcol;


if (win->pm) if (win->pm)
XFreePixmap(e->dpy, win->pm); XFreePixmap(e->dpy, win->pm);
win->pm = XCreatePixmap(e->dpy, win->xwin, e->scrw, e->scrh, e->depth); 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); XChangeGC(e->dpy, bgc, GCForeground, &gcval);

XFillRectangle(e->dpy, win->pm, bgc, 0, 0, e->scrw, e->scrh); XFillRectangle(e->dpy, win->pm, bgc, 0, 0, e->scrw, e->scrh);
} }




Carregando…
Cancelar
Salvar