Re: Automatic focus handling? How do I turn it off?



>>>Widgets are sent key presses before GTK+ checks for focus keys. If the
>>>widget handles the key press in its event handler and returns TRUE,
>>>then GTK+ will not check for tab/arrows.

not true in GTK+ 1.2. you have to stop the signal emission as well.

in GTK+ 1.2, the default handler is run regardless of the return
status of other connected handlers. the docs for GTK+ 1.2 do not make
this particularly clear. i believe that in GTK+ 1.3/2.0, this is no
longer true, and things work the way the docs tend to suggest.

its the default handler for key press events in a GtkWindow that
controls the movement of focus between widgets in that window. the
handler is executed unless you block the emission in the widget that
currently has focus (i.e. the one that the window directs the events
to).

as i've mentioned, i find it easier to do all this stuff using a key
snooper, which allows you to completely bypass all of GTK+'s builtin
key handling.

--p





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