GTK+ FAQ
<<< Previous | Development with GTK+: general questions | Next >>>

# I have my signal connected to the the (whatever) event, but it seems I don't catch it. What's wrong?

There is some special initialisation to do in order to catch some particular events. In fact, you must set the correct event mask bit of your widget before getting some particular events.

For example,

      gtk_widget_add_events(window, GDK_KEY_RELEASE_MASK);

lets you catch the key release events. If you want to catch every events, simply us the GDK_ALL_EVENTS_MASK event mask.

All the event masks are defined in the `gdktypes.h` file.

<<< Previous | Home | Next >>>
Data I pass to the `delete_event` (or other event) handler gets corrupted. | Up | I need to add a new signal to a GTK+ widget. Any idea?