There are now two ways to achieve this, one is by using the patch as provided in: https://bugzilla.gnome.org/show_bug.cgi?id=729248 which adds an gtk_socket_focus_forward ()
method to GtkSocket
. Calling this will focus the first widget inside the Gtk::Plug
window.
An example of using gtk_socket_focus_forward
can be found in the focus_forward branch of an example adapted from the standard example.
The second way to achieve this is to send the Gtk::DIR_TAB_FORWARD
signal as described on the mailing list, a similar example can be found in the tab_forward branch.
This involves the following:
socket->set_can_focus (true);
socket->child_focus (Gtk::DIR_TAB_FORWARD);
The method does diverge slightly from what is possible with gtk_socket_focus_forward
, but appears to do the trick.