[gtk] window: Remove GList link directly



commit 14feafe3a9051ca1e8b515bc62dbd6acdd1c55b0
Author: Timm Bäder <mail baedert org>
Date:   Sun Feb 10 10:28:32 2019 +0100

    window: Remove GList link directly
    
    Instead of walking the list again and looking for the GList pointer we
    already have.

 gtk/gtkwindow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 38690e7e56..db108c8a2d 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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))


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