Date: Mon, 4 Sep 2006 09:47:00 +0200 From: Maxence Guesdon Cc: LablGTK List Subject: Re: Getting the focused widget Message-ID: <20060904094700.10c73c56 at tintin.inria.fr> In-Reply-To: <44F6A6A9.1090304 at rftp.com> References: <20060831102549.0857e375 at tintin.inria.fr> <44F6A6A9.1090304@rftp.com> Organization: INRIA Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Content-Length: 803 On Thu, 31 Aug 2006 02:06:49 -0700 Robert Roessler wrote: > Maxence Guesdon wrote: > > Is there a way to get the focused widget ? or at least to know whether a > > given widget has the focus ? > > Well, there are events emitted when the focus is gained (focus_in) and > lost (focus_out), so it is easy to connect callback handlers for these > to specific widgets... Indeed, that's what I found out and it works great :) > Also, a widget can take the focus for itself (grab_focus). I use it too. > While I have used the above functionality, there is also the ability > to ask whether a *window* has the focus (has_toplevel_focus), which I > have not used. Thanks for your response. Regards, -- Maxence Guesdon http://yquem.inria.fr/~guesdon/ http://devel.inria.fr/rocq/