Path: utzoo!attcan!uunet!husc6!bloom-beacon!ZERMATT.LCS.MIT.EDU!RWS
From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler)
Newsgroups: comp.windows.x
Subject: question about widget visibility
Message-ID: <19880705142132.3.RWS@KILLINGTON.LCS.MIT.EDU>
Date: 5 Jul 88 14:21:00 GMT
References: <8807041447.AA00568@special-k.ai.mit.edu>
Sender: daemon@bloom-beacon.MIT.EDU
Organization: The Internet
Lines: 28


    Date: Mon, 4 Jul 88 10:47:21 EDT
    From: sundar@wheaties.ai.mit.edu (Sundar Narasimhan)

	XtAddEventHandler(top, VisibilityNotify, 0, visibility, 0);

This should work, if you use the correct argument of VisibilityChangeMask
instead of VisibilityNotify.

    Since my handler is never being invoked obviously
    the default is for visible_interest to be set to FALSE.

The default is FALSE, but this is independent of whether your handler
is called.  visible_interest simply controls dynamic updating of the
"visible" Core component.

    I can't seem to be
    able to set this variable.

visible_interest is a class component, not an instance component.
To change it, you need to create a new (sub)class.

    So, folks, what is the recommended way of finding out when your widget
    is visible?

Well, generally the right thing is to register an expose proc, and
repaint only when your expose proc gets called (or in response to
direct user input, of course).