214 |
|
|
215 |
|
init(argc, argv); /* get file and open window */ |
216 |
|
|
217 |
– |
if (parent < 0) { |
218 |
– |
kill(getppid(), SIGCONT); /* signal parent if child */ |
219 |
– |
sigrecv--; |
220 |
– |
} |
217 |
|
for ( ; ; ) |
218 |
|
getevent(); /* main loop */ |
219 |
|
userr: |
272 |
|
if (gamstr == NULL) /* get it from the X server */ |
273 |
|
gamstr = XGetDefault(thedisplay, "radiance", "gamma"); |
274 |
|
if (gamstr == NULL) /* get it from the environment */ |
275 |
< |
gamstr = getenv("GAMMA"); |
275 |
> |
gamstr = getenv("DISPLAY_GAMMA"); |
276 |
|
if (gamstr != NULL) |
277 |
|
gamcor = atof(gamstr); |
278 |
|
/* get best visual for default screen */ |
349 |
|
XSetWMProtocols(thedisplay, wind, &closedownAtom, 1); |
350 |
|
|
351 |
|
XMapWindow(thedisplay, wind); |
356 |
– |
return; |
352 |
|
} /* end of init */ |
353 |
|
|
354 |
|
|
557 |
|
map_rcolors(ourras, wind); |
558 |
|
if (fast) |
559 |
|
make_rpixmap(ourras, wind); |
560 |
+ |
if (parent < 0 & sigrecv == 0) { /* notify parent */ |
561 |
+ |
kill(getppid(), SIGCONT); |
562 |
+ |
sigrecv--; |
563 |
+ |
} |
564 |
|
break; |
565 |
|
case UnmapNotify: |
566 |
|
if (!fast) |