now that works better

SVN revision: 1148
This commit is contained in:
Carsten Haitzler 1999-11-02 14:42:00 +00:00
parent dbb01a2a05
commit c0d3e08f71
1 changed files with 26 additions and 2 deletions

View File

@ -100,6 +100,7 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
NULL, IMLIB_OP_COPY); NULL, IMLIB_OP_COPY);
XSetWindowBackgroundPixmap(disp, win, pm); XSetWindowBackgroundPixmap(disp, win, pm);
XClearArea(disp, win, update_x, update_y, update_w, update_h, False); XClearArea(disp, win, update_x, update_y, update_w, update_h, False);
XFlush(disp);
} }
int int
@ -183,7 +184,7 @@ main (int argc, char **argv)
{ {
no++; no++;
if (no == argc) if (no == argc)
exit(0); no = argc - 1;
file = argv[no]; file = argv[no];
image_width = 0; image_width = 0;
zoom = 1.0; zoom = 1.0;
@ -200,6 +201,27 @@ main (int argc, char **argv)
im = imlib_load_image_with_progress_callback(file, progress, 10); im = imlib_load_image_with_progress_callback(file, progress, 10);
} }
} }
if (b == 2)
{
no--;
if (no == 0)
no = 1;
file = argv[no];
image_width = 0;
zoom = 1.0;
zoom_mode = 0;
imlib_free_image_and_decache(im);
im = imlib_load_image_with_progress_callback(file, progress, 10);
while (!im)
{
no--;
if (no == 0)
no = 1;
file = argv[no];
image_width = 0;
im = imlib_load_image_with_progress_callback(file, progress, 10);
}
}
break; break;
case MotionNotify: case MotionNotify:
while (XCheckTypedWindowEvent(disp, win, MotionNotify, &ev)); while (XCheckTypedWindowEvent(disp, win, MotionNotify, &ev));
@ -248,12 +270,13 @@ main (int argc, char **argv)
NULL, IMLIB_OP_COPY); NULL, IMLIB_OP_COPY);
XSetWindowBackgroundPixmap(disp, win, pm); XSetWindowBackgroundPixmap(disp, win, pm);
XClearWindow(disp, win); XClearWindow(disp, win);
XFlush(disp);
timeout = 1; timeout = 1;
} }
default: default:
break; break;
} }
t1 = 0.5; t1 = 0.2;
tval.tv_sec = (long)t1; tval.tv_sec = (long)t1;
tval.tv_usec = (long)((t1 - ((double)tval.tv_sec)) * 1000000); tval.tv_usec = (long)((t1 - ((double)tval.tv_sec)) * 1000000);
xfd = ConnectionNumber(disp); xfd = ConnectionNumber(disp);
@ -307,6 +330,7 @@ main (int argc, char **argv)
NULL, IMLIB_OP_COPY); NULL, IMLIB_OP_COPY);
XSetWindowBackgroundPixmap(disp, win, pm); XSetWindowBackgroundPixmap(disp, win, pm);
XClearWindow(disp, win); XClearWindow(disp, win);
XFlush(disp);
timeout = 0; timeout = 0;
} }
} }