imlib2_view: Fix event processing bug

This commit is contained in:
Kim Woelders 2019-11-10 14:22:26 +01:00
parent 3748dd580f
commit bb42ef3f22
1 changed files with 6 additions and 0 deletions

View File

@ -327,6 +327,10 @@ main(int argc, char **argv)
imlib_context_set_image(im);
break;
}
if (XPending(disp))
continue;
t1 = 0.2;
tval.tv_sec = (long)t1;
tval.tv_usec = (long)((t1 - ((double)tval.tv_sec)) * 1000000);
@ -334,10 +338,12 @@ main(int argc, char **argv)
fdsize = xfd + 1;
FD_ZERO(&fdset);
FD_SET(xfd, &fdset);
if (timeout)
count = select(fdsize, &fdset, NULL, NULL, &tval);
else
count = select(fdsize, &fdset, NULL, NULL, NULL);
if (count < 0)
{
if ((errno == ENOMEM) || (errno == EINVAL) || (errno == EBADF))