forked from AuroraMiddleware/gtk
window: Update has-focus property
Update the :has-focus property of the focus widget when the active status of the window changes. We change the property after generating the GDK_CROSSING_ACTIVE crossing events.
This commit is contained in:
parent
f545d7a910
commit
d9ad7884e9
@ -5864,9 +5864,15 @@ _gtk_window_set_is_active (GtkWindow *window,
|
||||
focus = g_object_ref (priv->focus_widget);
|
||||
|
||||
if (is_active)
|
||||
{
|
||||
synthesize_focus_change_events (window, NULL, focus, GTK_CROSSING_ACTIVE);
|
||||
gtk_widget_set_has_focus (focus, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
synthesize_focus_change_events (window, focus, NULL, GTK_CROSSING_ACTIVE);
|
||||
gtk_widget_set_has_focus (focus, FALSE);
|
||||
}
|
||||
|
||||
g_object_unref (focus);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user