load all images before starting the preso

This commit is contained in:
Markus Teich 2017-09-02 01:09:36 +02:00
parent 0ff43aaf34
commit 6df3d039a0

9
sent.c
View File

@ -436,12 +436,7 @@ advance(const Arg *arg)
if (slides[idx].img) if (slides[idx].img)
slides[idx].img->state &= ~SCALED; slides[idx].img->state &= ~SCALED;
idx = new_idx; idx = new_idx;
ffload(&slides[idx]);
xdraw(); xdraw();
if (slidecount > idx + 1)
ffload(&slides[idx + 1]);
if (0 < idx)
ffload(&slides[idx - 1]);
} }
} }
@ -533,6 +528,7 @@ void
xinit() xinit()
{ {
XTextProperty prop; XTextProperty prop;
unsigned int i;
if (!(xw.dpy = XOpenDisplay(NULL))) if (!(xw.dpy = XOpenDisplay(NULL)))
die("sent: Unable to open display"); die("sent: Unable to open display");
@ -560,7 +556,8 @@ xinit()
XSetWindowBackground(xw.dpy, xw.win, sc[ColBg].pixel); XSetWindowBackground(xw.dpy, xw.win, sc[ColBg].pixel);
xloadfonts(); xloadfonts();
ffload(&slides[0]); for (i = 0; i < slidecount; i++)
ffload(&slides[i]);
XStringListToTextProperty(&argv0, 1, &prop); XStringListToTextProperty(&argv0, 1, &prop);
XSetWMName(xw.dpy, xw.win, &prop); XSetWMName(xw.dpy, xw.win, &prop);