Grab focus problems



I've noticed when using gtk_widget_grab_focus in signal callbacks
and such, it often doesn't seem to work right.  If changing focus
to an entry widget, it gets highlighted like its got the keyboard
focus but no key presses work until I click in the widget.  I've
found that to work around this I need to use an idle callback and
do the focus grab in there instead.

I've assumed in my head that the problem is that the grab_focus
routine does some work immediately that other work queued up via
idle callbacks later messes up.  No idea if this is really the
problem or not but it would make sense to me.  I've had to work
around similar problems in Java and had to do so in the same way.

Is this a known problem?  If it is, why doesn't the grab_focus
routine itself do its work via an idle callback?

-- 
Brad Pepers
Linux Canada Inc.            Home of Linux products in Canada!
http://www.linuxcanada.com   Proud supporter of Cyclades, Red
brad@linuxcanada.com         Hat, and Caldera.



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