T.R | Title | User | Personal Name | Date | Lines |
---|
1540.1 | Only by using it | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Sat Oct 07 1989 00:20 | 14 |
| Try to do a GetWindowAttributes on it. If you get an error, it is not
valid.
Seriously! Something of that nature is the only way to tell if the
window exists. If you want to find out if the number you have is in
the correct format for an ID for your client, you can do that without
making a round trip, but you can't tell if it has actually been
created, or whether it might be a GC or a colormap or a cursor or
anything. You would also need to "break in" to some Xlib structures
which you are not supposed to know about.
Burns
|
1540.2 | | WAIT::DESAI | Jatin Desai | Fri Oct 13 1989 00:40 | 6 |
|
Also note that windows id's are re-used by the server. So if you ar going
to do this to any random window-id's, be careful!
Jatin
|
1540.3 | Nit | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Mon Oct 16 1989 01:17 | 10 |
| Not to be too much of a nit-picker on .2, but window id's are allocated
by the client, not the server. Our current clients do not reuse them.
I'm not sure what happens when they run out of ids after 2**20-some are
created. In any case, though, the server certainly recycles
client-ids (which are part of the ID that the client creates) so that
over the life of several clients you certainly might run across duplicate
IDs.
Burns
|