[gtk/wip/baedert/stb-rect-pack: 2/6] window: Remove GList link directly



commit 94fbf6d3e57ffa857e5cd79e0906cef4138de00f
Author: Timm Bäder <mail baedert org>
Date:   Wed Feb 6 15:58:46 2019 +0100

    window: Remove GList link directly
    
    We already have the link at hand, so don't search for the
    GtkPointerFocus in the list again.

 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]