Re: How to set keyboard focus to a window?
- From: "Harinandan S" <harinandans gmail com>
- To: gtk-list gnome org
- Subject: Re: How to set keyboard focus to a window?
- Date: Wed, 31 Dec 2008 10:30:34 +0530
gdk_keyboard_grab is also not helping me. There is no change in behavior. Does anyone know how to force a keyboard focus to a window without moving mouse over it?
Regards,
Harinandan S
On Mon, Dec 22, 2008 at 5:26 PM, zentara
<zentara1 sbcglobal net> wrote:
On Mon, 22 Dec 2008 10:54:26 +0530
>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?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]