[epiphany] Do not flash notebook arrow during session resume



commit 3afec576e274351ce5e35477727d692cd54ecb8d
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Thu Jul 16 18:09:18 2020 +0200

    Do not flash notebook arrow during session resume
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/1262

 src/ephy-notebook.c |  2 +-
 src/ephy-shell.c    | 10 ++++++++++
 src/ephy-shell.h    |  2 ++
 3 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index db5871b2e..fb0e6aeaa 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -955,7 +955,7 @@ ephy_notebook_add_tab (EphyNotebook *notebook,
     gtk_notebook_set_current_page (gnotebook, position);
     g_object_set_data (G_OBJECT (embed), "jump_to",
                        GINT_TO_POINTER (jump_to));
-  } else {
+  } else if (ephy_shell_startup_finished (ephy_shell_get_default ())) {
     PresentTabData *pt_data = present_tab_data_new (notebook, gtk_notebook_get_current_page (gnotebook), 
position);
     pt_data->flash_id = g_idle_add (present_new_tab, pt_data);
   }
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 5558ea6d4..0c9d95853 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -70,6 +70,7 @@ struct _EphyShell {
 
   GHashTable *notifications;
   gchar *open_notification_id;
+  gboolean startup_finished;
 };
 
 static EphyShell *ephy_shell = NULL;
@@ -165,6 +166,8 @@ ephy_shell_startup_continue (EphyShell               *shell,
     EphyWindow *window = ephy_window_new ();
     ephy_link_open (EPHY_LINK (window), NULL, NULL, EPHY_LINK_HOME_PAGE);
   }
+
+  shell->startup_finished = TRUE;
 }
 
 static void
@@ -824,6 +827,7 @@ ephy_shell_init (EphyShell *shell)
   /* globally accessible singleton */
   g_assert (ephy_shell == NULL);
   ephy_shell = shell;
+  ephy_shell->startup_finished = FALSE;
   g_object_add_weak_pointer (G_OBJECT (ephy_shell),
                              (gpointer *)ptr);
 
@@ -1483,3 +1487,9 @@ ephy_shell_send_notification (EphyShell     *shell,
   shell->open_notification_id = g_strdup (id);
   g_application_send_notification (G_APPLICATION (shell), id, notification);
 }
+
+gboolean
+ephy_shell_startup_finished (EphyShell *shell)
+{
+  return shell->startup_finished;
+}
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 63366bc96..e7a63f944 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -127,4 +127,6 @@ void                     ephy_shell_send_notification     (EphyShell        *she
                                                            gchar            *id,
                                                            GNotification    *notification);
 
+gboolean                 ephy_shell_startup_finished      (EphyShell *shell);
+
 G_END_DECLS


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