Give keyboard focus to GtkMenu

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

 



I'm popping-up a GtkMenu at random coordinates on the screen (outside of
my application's main window). I'd like to give keyboard focus to this
GtkMenu.

Since I'm using Windows, I tried:

SetForegroundWindow(GDK_WINDOW_HWND(menu->window));

But that causes the menu to immediately disappear, as does:

SetFocus(GDK_WINDOW_HWND(menu->window));

I also tried:

GTK_WIDGET_SET_FLAGS(menu, GTK_CAN_FOCUS);
gtk_widget_grab_focus(menu);

But that doesn't do anything at all. Any ideas? I'm trying to make it so
that the user can navigate the menu using their keyboard.


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux