Hi If your application should get being accepted you should consider ATK
https://developer.gnome.org/atk/ else forget the focus handling cheers, Joël Krähemann On Mon, Sep 5, 2016 at 3:25 PM, Joël Krähemann <jkraehem...@gmail.com> wrote: > Hi > > you might want to look at: > > * gtk_widget_set_can_focus ()¨ > * gtk_widget_set_events() > > > g_object_set(window, > "can-focus\0", TRUE, > NULL); > gtk_widget_set_events((GtkWidget *) window, > GDK_CONTROL_MASK > | GDK_KEY_PRESS_MASK > | GDK_KEY_RELEASE_MASK) > > ... > > g_signal_connect_after(G_OBJECT(window), "focus_in_event\0", > > G_CALLBACK(your_window_box_focus_in_callback), (gpointer) window); > > g_signal_connect_after(G_OBJECT(window), "focus_out_event\0", > > G_CALLBACK(your_window_box_focus_out_callback), (gpointer) window); > > ... > > gtk_widget_set_state((GtkWidget *) window, > GTK_STATE_ACTIVE); > > That's it. > > bests, > Joël > > On Mon, Sep 5, 2016 at 2:57 PM, Paulo Silva <pa...@sistemasolar.com.br> wrote: >> I don't now if I understood correctly your problem. >> Maybe this: >> >> gtk_window_present( GTK_WINDOW(ptr_to_your_window) ); >> >> José Paulo >> >> >> 2016-09-04 13:58 GMT-03:00 dmg <d...@uvic.ca>: >> >>> On Sun, Sep 4, 2016 at 9:57 AM, dmg <d...@uvic.ca> wrote: >>> >>> > >>> > I have tried using gtk_window_set_focus(winMain); but this does not >>> work. >>> > >>> >>> My mistake. I have used: >>> >>> gtk_widget_grab_focus(winMain); >>> >>> and it does not work. >>> >>> >>> >>> >>> -- >>> --dmg >>> >>> --- >>> Daniel M. German >>> http://turingmachine.org >>> _______________________________________________ >>> gtk-app-devel-list mailing list >>> gtk-app-devel-list@gnome.org >>> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list >>> >> _______________________________________________ >> gtk-app-devel-list mailing list >> gtk-app-devel-list@gnome.org >> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list