Re: visibility_notify_event
- From: Owen Taylor <otaylor redhat com>
- To: Federico Mena Quintero <federico helixcode com>
- Cc: Aaron Kennedy <aaron icr com au>, Gnome Devel <gnome-devel-list gnome org>
- Subject: Re: visibility_notify_event
- Date: 31 Oct 2000 14:40:48 -0500
Federico Mena Quintero <federico helixcode com> writes:
> Aaron Kennedy <aaron icr com au> writes:
>
> > I am having a problem getting a GtkWindow to emit the event
> > visibility_notify_event. In the Gtk Documentation, I see that this event
> > is emitted for a GtkWidget, but not it's "derived" widget GtkWindow. Is
> > there a way to get GtkWindow to emit this also? An example is given
> > below, where the function "function()" is never called...
> >
> > GtkWidget *window;
> > window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> > gtk_signal_connect(GTK_OBJECT(window), "visibility_notify_event",
> > GTK_SIGNAL_FUNC(function), NULL);
>
> Try
>
> gtk_widget_add_events (window,
> (gtk_wiget_get_events (window)
> | GDK_VISIBILITY_NOTIFY_MASK));
Uhh, that's why it is called add_events(), because it adds
to the existing event mask....
gtk_widget_add_events (window, GDK_VISIBILITY_NOTIFY_MASK));
Is completely equivalent.
Regards,
Owen
[ gtk_widget_set_events() is the more common function that that just
sets the event mask. The main limitation of it is that it has to be
called before the window is initially shown, so this is why
gtk_widget_add_events() was added. It wasn't possible to reliably
_set_ the event mask after the window was shown, but augmenting it
is possible. ]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]