How does the Zvt widget stop further key_press_event processing ?



I am currently learning the Gtk toolkit. As part of this, I have
created a key_press_event handler attached to the drawing area
widget. I am using the GTK supplied with Redhat Linux 6.2, which
is version 1.2.6.

I encountered the problem of the widget losing focus when the widget
navigation keys (up/down arrow, etc) were pressed and fixed it by
using gtk_signal_emit_stop_by_name() and then returning TRUE from
my key_press_event handler. Just returning TRUE did not fix the
problem and looking in the mailing list archives I now understand
why.

Looking at the Gtk widget source code to see how the widgets handle
the problem, I noticed that they used the same approach that I am,
but also noticed that the Zvt terminal widget does not appear to
have any code in it to explicitly stop further key_press_event
processing.

How does the Zvt widget stop itself from losing focus when the
arrow keys are pressed ?

Thanks for any information,

Simon.

-- 
Simon Clubley
simon_clubley remove_me altavista co uk-Earth UFP



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