[epiphany/gnome-3-36] Fix tab open order after tab close



commit a1dd7e6de79b69a606dd019228e5868256b18198
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Fri Jul 10 20:17:08 2020 +0000

    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
    
    
    (cherry picked from commit bd291c90a0b8f7122eaade1367d0256b6f07f8eb)

 src/ephy-window.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 527e213b6..238412595 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2850,6 +2850,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]