mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
window: Make set_focus equal to grab_focus
Make gtk_window_set_focus call gtk_widget_grab_focus internally. This means that set_focus can now end up putting the focus on a child of the passed-in widget, and makes the focus-widget property work for setting initial focus to (the child of) an entry in a ui file.
This commit is contained in:
parent
a65fd81106
commit
2a18f2150d
@ -5667,7 +5667,10 @@ gtk_window_set_focus (GtkWindow *window,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
|
||||
gtk_root_set_focus (GTK_ROOT (window), focus);
|
||||
if (focus)
|
||||
gtk_widget_grab_focus (focus);
|
||||
else
|
||||
gtk_window_root_set_focus (GTK_ROOT (window), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user