Re: Map/unmap across plug/socket boundaries



Darin Adler <darin eazel com> writes:

> on 4/25/01 8:53 PM, Federico Mena Quintero at federico ximian com wrote:
> 
> > Ummm, why not just use VisibilityNotify events?
> 
> Sounds good. How do I do that with GTK? (Sorry to be asking such a basic
> question in the public forum, but maybe others want to know too.)

Well, VisibilityNotify is something different than what you were
asking about, but may cover what you were asking. You need to 
call gtk_widget_set_events () with GDK_VISIBILITY_NOTIFY_MASK included
and simply connect to ::visibility_notify_event.

typedef enum {
  GDK_VISIBILITY_UNOBSCURED,
  GDK_VISIBILITY_PARTIAL,
  GDK_VISIBILITY_FULLY_OBSCURED
} GdkVisibilityState;

struct _GdkEventVisibility
{
  GdkEventType type;
  GdkWindow *window;
  gint8 send_event;
  GdkVisibilityState state;
};

Just be careful about race conditions - you will be visible before
you get a ::visibility_notify_event, so you should never do something
like deciding whether to redraw based on whether you think you
are visible or not.

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]