Message-ID: <44F6A6A9.1090304 at rftp.com> Date: Thu, 31 Aug 2006 02:06:49 -0700 From: Robert Roessler Organization: Robert's High-performance Software MIME-Version: 1.0 To: LablGTK List Subject: Re: Getting the focused widget References: <20060831102549.0857e375 at tintin.inria.fr> In-Reply-To: <20060831102549.0857e375 at tintin.inria.fr> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Length: 569 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... Also, a widget can take the focus for itself (grab_focus). 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. Robert Roessler robertr@rftp.com http://www.rftp.com