81 |
|
|
82 |
|
int wrongformat = 0; /* input in another format? */ |
83 |
|
|
84 |
+ |
int imready = 0; /* is image up? */ |
85 |
+ |
|
86 |
|
GC revgc; /* graphics context with GXinvert */ |
87 |
|
|
88 |
|
XRASTER *ourras; /* our stored image */ |
282 |
|
|ButtonMotionMask|StructureNotifyMask |
283 |
|
|KeyPressMask|ExposureMask); |
284 |
|
XMapWindow(thedisplay, wind); |
285 |
< |
/* store name last as ready signal */ |
285 |
> |
/* make sure the image is up */ |
286 |
> |
do |
287 |
> |
getevent(); |
288 |
> |
while (!imready); |
289 |
> |
/* store name as ready signal */ |
290 |
|
XStoreName(thedisplay, wind, fname == NULL ? progname : fname); |
291 |
|
return; |
292 |
|
memerr: |
394 |
|
break; |
395 |
|
case Expose: |
396 |
|
redraw(e.e.x, e.e.y, e.e.width, e.e.height); |
397 |
+ |
imready++; |
398 |
|
break; |
399 |
|
case ButtonPress: |
400 |
|
if (e.b.state & (ShiftMask|ControlMask)) |