Re: Differences between kinds of events



Gnaural wrote:
I ultimately just used g_signal_connect with the main
window to catch keypresses. But it wasn't clear to me
why I couldn't get g_signal_connect to handle keyboard
events for a drawing area. Any explanation would be
appreciated.

You should use gtk_widget_add_events() instead (in order
to not scrap the default events); and you should call it
before calling gtk_widget_show() and adding it to a container.

the event mask on the widget needs to be setup before the
widget is realized.

Cheers,
                       -Tristan



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