| 197 |
|
Window rw, cw; |
| 198 |
|
unsigned int pm; |
| 199 |
|
/* compute pointer location */ |
| 200 |
< |
if (gwind == 0 && |
| 201 |
< |
(gwind = xfindwind(theDisplay, rwind, picture, 4)) == 0) { |
| 202 |
< |
fprintf(stderr, "%s: cannot find display window!\n", progname); |
| 203 |
< |
exit(1); |
| 200 |
> |
if (gwind == 0) { |
| 201 |
> |
register char *wn; |
| 202 |
> |
for (wn = picture; *wn; wn++); |
| 203 |
> |
while (wn > picture && wn[-1] != '/') wn--; |
| 204 |
> |
if ((gwind = xfindwind(theDisplay, rwind, wn, 4)) == 0) { |
| 205 |
> |
fprintf(stderr, "%s: cannot find display window!\n", |
| 206 |
> |
progname); |
| 207 |
> |
exit(1); |
| 208 |
> |
} |
| 209 |
|
} |
| 210 |
|
XQueryPointer(theDisplay, gwind, &rw, &cw, &rx, &ry, &wx, &wy, &pm); |
| 211 |
|
xoff = wx - ipt[0]; |