window: Remove GList link directly

Instead of walking the list again and looking for the GList pointer we
already have.
This commit is contained in:
Timm Bäder 2019-02-10 10:28:32 +01:00
parent d1ea591f18
commit 14feafe3a9

View File

@ -10707,7 +10707,8 @@ gtk_window_update_pointer_focus_on_state_change (GtkWindow *window,
if (GTK_WIDGET (focus->toplevel) == widget)
{
/* Unmapping the toplevel, remove pointer focus */
gtk_window_remove_pointer_focus (window, focus);
priv->foci = g_list_remove_link (priv->foci, cur);
gtk_pointer_focus_unref (focus);
}
else if (focus->target == widget ||
gtk_widget_is_ancestor (focus->target, widget))