[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1540.0. "Valid Window ID" by AVIATE::SHAH (LDP Technical Support Group) Thu Oct 05 1989 13:52

I have a question regarding window ID's.  If it's been answered before, please point
me to the proper note....

Is there any fast and simple way of determining if a window id is valid?  I'd like to
know if that window id exists.   That window doesn't have to be mapped.....


Thanks in advance,
-Pratish Shah

T.RTitleUserPersonal
Name
DateLines
1540.1Only by using itDECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Sat Oct 07 1989 00:2014
    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.2WAIT::DESAIJatin DesaiFri Oct 13 1989 00:406
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.3NitDECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Mon Oct 16 1989 01:1710
    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