Re: Finding Focus



A better way to do it is to find what toplevel window has focus
using XGetInputFocus() and gdk_window_lookup(), and then find
the focus widget within that window using 

 GTK_WINDOW (widget)->focus_widget.

This technique is obviously low-level and a little hackish,  but
it sounds like what you are doing basically falls in that category
anyways,
                                        Owen

Maher Awamy <muhri muhri net> writes:

> I think you can query that with the macro GTK_WIDGET_HAS_FOCUS(widget);
> 
> Maher
> 
> On Tue, 10 Oct 2000 14:26:03 -0400, Dugas, Alan said:
> 
> > Is there a way to determine what widget currently has the keyboard focus?  What
> >  I am try to do is setup a "paste" utility that will check to see if the widget
> >  with the current keyboard focus is a gtkeditable that is editable before
> >  attempting a paste.  Thanks in advance to those who reply.




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