Re: How to set keyboard focus to a window?
- From: zentara <zentara1 sbcglobal net>
- To: gtk-list gnome org
- Subject: Re: How to set keyboard focus to a window?
- Date: Mon, 22 Dec 2008 06:56:31 -0500
On Mon, 22 Dec 2008 10:54:26 +0530
"Harinandan S" <harinandans gmail com> wrote:
>Both the APIs set the focus to a widget if the mouse pointer is over the
>window containing the widget. Hovewer in my case mouse is not there and
>hence focus is not going to that window. Is there any other way to get the
>focus?
>
>gtk_widget_grab_focus(widget)
>gtk_window_set_focus (window, widget);
>
>Regards,
>Harinandan S
Search thru
http://library.gnome.org/devel/gtk/stable/GtkWidget.html
for the word 'global'.
finding:
gtk_widget_is_focus ()
and
gtk_widget_grab_default ()
Also, your window manager has some settings on how screen focus
is handled.
You might be looking for a global keyboard grab?
It will completely grab the keyboard for your app.
See
http://library.gnome.org/devel/gdk/stable/gdk-General.html
and search for
gdk_keyboard_grab ()
Can you provide a simple code example explaining/showing what you want?
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]