Re: How to set keyboard focus to a window?

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?

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
"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
>gtk_window_set_focus (window, widget);
>Harinandan S

Search thru
for the word 'global'.

gtk_widget_is_focus ()
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.
and search for
gdk_keyboard_grab ()

Can you provide a simple code example explaining/showing what you want?


I'm not really a human, but I play one on earth.
gtk-list mailing list
gtk-list gnome org

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