| 81 |
|
|
| 82 |
|
int wrongformat = 0; /* input in another format? */ |
| 83 |
|
|
| 84 |
– |
int imready = 0; /* is image up? */ |
| 85 |
– |
|
| 84 |
|
GC revgc; /* graphics context with GXinvert */ |
| 85 |
|
|
| 86 |
|
XRASTER *ourras; /* our stored image */ |
| 248 |
|
XSetFunction(thedisplay, revgc, GXinvert); |
| 249 |
|
XDefineCursor(thedisplay, wind, XCreateFontCursor(thedisplay, |
| 250 |
|
XC_diamond_cross)); |
| 251 |
+ |
XStoreName(thedisplay, wind, fname == NULL ? progname : fname); |
| 252 |
|
if (geometry != NULL) { |
| 253 |
|
bzero((char *)&oursizhints, sizeof(oursizhints)); |
| 254 |
|
i = XParseGeometry(geometry, &oursizhints.x, &oursizhints.y, |
| 281 |
|
|ButtonMotionMask|StructureNotifyMask |
| 282 |
|
|KeyPressMask|ExposureMask); |
| 283 |
|
XMapWindow(thedisplay, wind); |
| 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); |
| 284 |
|
return; |
| 285 |
|
memerr: |
| 286 |
|
quiterr("out of memory"); |
| 387 |
|
break; |
| 388 |
|
case Expose: |
| 389 |
|
redraw(e.e.x, e.e.y, e.e.width, e.e.height); |
| 397 |
– |
imready++; |
| 390 |
|
break; |
| 391 |
|
case ButtonPress: |
| 392 |
|
if (e.b.state & (ShiftMask|ControlMask)) |