Re: how do i lose focus from a widget?
- From: Owen Taylor <otaylor redhat com>
- To: Havoc Pennington <hp redhat com>
- Cc: Paul Davis <paul linuxaudiosystems com>, gtk-list gnome org
- Subject: Re: how do i lose focus from a widget?
- Date: 29 May 2003 12:48:45 -0400
On Thu, 2003-05-29 at 11:52, Havoc Pennington wrote:
> On Thu, May 29, 2003 at 11:31:28AM -0400, Paul Davis wrote:
> > how can i get do the opposite of gtk_widget_grab_focus()? i want the
> > toplevel window to have its focus widget unset so that when the mouse
> > re-enters the window, we will not try to assign focus to a widget.
> >
> > can this be done?
>
> GTK 1.2 had the mysterious "nothing is focused" state IIRC but it was
> basically a bug; in GTK 2 I'm pretty sure some widget always has
> focus. I don't remember how to get 1.2 into the "nothing is focused"
> state though.
In GTK+-2.x you can get GTK+ into the "nothing focused" state
by:
gtk_window_set_focus (window, NULL);
It's needed for pathological cases like deleting the focused
widget.
I think it might work with 1.2 as well, even though
gtk_window_set_focus() was considered an internal function,
it was exported, as I recall.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]