[comp.windows.x] Is widget mapped?

bob@odi.COM (Bob Miner) (12/30/89)

This feels like a beginner's question, so I feel silly asking it, but
what the heck...

If I've done the following:

    * created a widget with the XtNMappedWhenManaged resource set to False

    * realized the widget

    * later mapped and possibly unmapped the widget WITHOUT maintaining
      state in my code as to the mapped state of the widget

Is there any way to determine whether the widget is mapped or unmapped?
I'm looking for some method akin to XtIsRealized() for determining the
mapped state of the widget - something like XtIsMapped().

Thus far is seems like I must maintain state in my own code, which I'd
rather not do.  But if I have to, I suppose I will.

Thanks,

Bob Miner

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert H. Miner		       ~   Email: bob@odi.com OR odi!bob@uunet.uu.net
Object Design Inc.	       ~   Phone: (617) 270-9797
1 New England Executive Park   ~   Opinions expressed are my own, not ODI's.
Burlington, MA 01803	USA    ~   "It's the same old ending, time to go."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

klee@chico.pa.dec.com (Ken Lee) (12/30/89)

In article <8912291635.AA08938@hendrix.odi.com>, bob@odi.COM (Bob Miner)
writes:
> Is there any way to determine whether the widget is mapped or unmapped?
> I'm looking for some method akin to XtIsRealized() for determining the
> mapped state of the widget - something like XtIsMapped().

You can do a XGetWindowAttributes() on the widget's window, but this is
a protocol request, and thus somewhat slower than maintaining your own
state.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@decwrl.dec.com
uucp: uunet!decwrl!klee