Re: how do i lose focus from a widget?



>In GTK+-2.x you can get GTK+ into the "nothing focused" state
>by:
>
> gtk_window_set_focus (window, NULL);

i tried that, but it was called from a focus_out handler, and caused a
segfault. it worked when called from an activate handler.

meanwhile, i've done the cleaner thing of having an event box grab the
focus whenever i want the focus to shift. it has no key event
handlers, and so key events get propagated up to the top level window
correctly. sound OK?





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