[epiphany] Fix tab open order after tab close



commit bd291c90a0b8f7122eaade1367d0256b6f07f8eb
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Fri Jul 10 22:17:08 2020 +0200

    Fix tab open order after tab close
    
    Reset internal last openend embed on tab close to ensure that new append tab position
    is recalculated.
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/1240

 src/ephy-window.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index bccc5c4ff..975c03fb3 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2935,6 +2935,10 @@ ephy_window_close_tab (EphyWindow *window,
   g_object_set_data (G_OBJECT (tab), "ephy-window-close-tab-closed", GINT_TO_POINTER (TRUE));
   gtk_widget_destroy (GTK_WIDGET (tab));
 
+  if (window->last_opened_embed)
+    g_clear_weak_pointer ((gpointer *)&window->last_opened_embed);
+  window->last_opened_embed = NULL;
+
   /* If that was the last tab, destroy the window.
    *
    * Beware: window->closing could be true now, after destroying the


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