[epiphany] Revert "Revert "Stop using gtk_window_present()""
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Revert "Revert "Stop using gtk_window_present()""
- Date: Tue, 19 Mar 2019 18:48:56 +0000 (UTC)
commit f94b807a7ff11d5d82e067ca778f23d4bc423466
Author: Michael Catanzaro <mcatanzaro posteo net>
Date: Tue Mar 19 18:48:45 2019 +0000
Revert "Revert "Stop using gtk_window_present()""
This reverts commit 3a07ad28104d6a54a245393766fdd6a46ae4641a
src/ephy-session.c | 2 +-
src/ephy-window.c | 11 +++++++++--
src/prefs-dialog.c | 14 +++++++-------
src/window-commands.c | 8 ++++----
4 files changed, 21 insertions(+), 14 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 465ac5053..ed8fb3502 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -273,7 +273,7 @@ ephy_session_undo_close_tab (EphySession *session)
}
gtk_widget_grab_focus (GTK_WIDGET (new_tab));
- gtk_window_present (GTK_WINDOW (window));
+ gtk_window_present_with_time (GTK_WINDOW (window), gtk_get_current_event_time ());
closed_tab_free (tab);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index cc081ea9f..ca161a4ff 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -169,10 +169,12 @@ struct _EphyWindow {
guint is_fullscreen : 1;
guint closing : 1;
guint is_popup : 1;
- guint present_on_insert : 1;
guint updating_address : 1;
guint force_close : 1;
guint checking_modified_forms : 1;
+ guint present_on_insert : 1;
+
+ guint32 present_on_insert_user_time;
};
enum {
@@ -2584,7 +2586,11 @@ notebook_popup_menu_cb (GtkNotebook *notebook,
static gboolean
present_on_idle_cb (GtkWindow *window)
{
- gtk_window_present (window);
+ EphyWindow *ephy_window = EPHY_WINDOW (window);
+
+ gtk_window_present_with_time (window, ephy_window->present_on_insert_user_time);
+ ephy_window->present_on_insert_user_time = 0;
+
return FALSE;
}
@@ -2866,6 +2872,7 @@ notebook_create_window_cb (GtkNotebook *notebook,
new_window = ephy_window_new ();
new_window->present_on_insert = TRUE;
+ new_window->present_on_insert_user_time = gtk_get_current_event_time ();
return ephy_window_get_notebook (new_window);
}
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 9f6125770..a961dea4f 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -677,7 +677,7 @@ on_sync_synced_tabs_button_clicked (GtkWidget *button,
synced_tabs_dialog = synced_tabs_dialog_new (manager);
gtk_window_set_transient_for (GTK_WINDOW (synced_tabs_dialog), GTK_WINDOW (dialog));
gtk_window_set_modal (GTK_WINDOW (synced_tabs_dialog), TRUE);
- gtk_window_present (GTK_WINDOW (synced_tabs_dialog));
+ gtk_window_present_with_time (GTK_WINDOW (synced_tabs_dialog), gtk_get_current_event_time ());
}
static void
@@ -885,7 +885,7 @@ on_manage_webapp_additional_urls_button_clicked (GtkWidget *button,
urls_dialog = ephy_webapp_additional_urls_dialog_new ();
gtk_window_set_transient_for (GTK_WINDOW (urls_dialog), GTK_WINDOW (dialog));
gtk_window_set_modal (GTK_WINDOW (urls_dialog), TRUE);
- gtk_window_present (GTK_WINDOW (urls_dialog));
+ gtk_window_present_with_time (GTK_WINDOW (urls_dialog), gtk_get_current_event_time ());
}
static void
@@ -898,7 +898,7 @@ on_manage_cookies_button_clicked (GtkWidget *button,
gtk_window_set_transient_for (GTK_WINDOW (cookies_dialog), GTK_WINDOW (dialog));
gtk_window_set_modal (GTK_WINDOW (cookies_dialog), TRUE);
- gtk_window_present (GTK_WINDOW (cookies_dialog));
+ gtk_window_present_with_time (GTK_WINDOW (cookies_dialog), gtk_get_current_event_time ());
}
static void
@@ -913,7 +913,7 @@ on_manage_passwords_button_clicked (GtkWidget *button,
gtk_window_set_transient_for (GTK_WINDOW (passwords_dialog), GTK_WINDOW (dialog));
gtk_window_set_modal (GTK_WINDOW (passwords_dialog), TRUE);
- gtk_window_present (GTK_WINDOW (passwords_dialog));
+ gtk_window_present_with_time (GTK_WINDOW (passwords_dialog), gtk_get_current_event_time ());
}
static void
@@ -926,7 +926,7 @@ on_search_engine_dialog_button_clicked (GtkWidget *button,
gtk_window_set_transient_for (search_engine_dialog, GTK_WINDOW (dialog));
gtk_window_set_modal (search_engine_dialog, TRUE);
- gtk_window_present (search_engine_dialog);
+ gtk_window_present_with_time (search_engine_dialog, gtk_get_current_event_time ());
}
static gboolean
@@ -1410,7 +1410,7 @@ language_editor_add_button_clicked_cb (GtkWidget *button,
(gpointer *)add_lang_dialog);
}
- gtk_window_present (GTK_WINDOW (pd->add_lang_dialog));
+ gtk_window_present_with_time (GTK_WINDOW (pd->add_lang_dialog), gtk_get_current_event_time ());
}
static void
@@ -1711,7 +1711,7 @@ clear_personal_data_button_clicked_cb (GtkWidget *button,
NULL);
gtk_window_set_transient_for (GTK_WINDOW (clear_dialog), GTK_WINDOW (dialog));
gtk_window_set_modal (GTK_WINDOW (clear_dialog), TRUE);
- gtk_window_present (GTK_WINDOW (clear_dialog));
+ gtk_window_present_with_time (GTK_WINDOW (clear_dialog), gtk_get_current_event_time ());
}
static gboolean
diff --git a/src/window-commands.c b/src/window-commands.c
index 3383cffca..090e3ff5d 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -498,7 +498,7 @@ window_cmd_show_history (GSimpleAction *action,
if (GTK_WINDOW (user_data) != gtk_window_get_transient_for (GTK_WINDOW (dialog)))
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (user_data));
- gtk_window_present (GTK_WINDOW (dialog));
+ gtk_window_present_with_time (GTK_WINDOW (dialog), gtk_get_current_event_time ());
}
void
@@ -514,7 +514,7 @@ window_cmd_show_preferences (GSimpleAction *action,
gtk_window_set_transient_for (dialog,
GTK_WINDOW (user_data));
- gtk_window_present (dialog);
+ gtk_window_present_with_time (dialog, gtk_get_current_event_time ());
}
void
@@ -541,7 +541,7 @@ window_cmd_show_shortcuts (GSimpleAction *action,
if (gtk_window_get_transient_for (GTK_WINDOW (shortcuts_window)) != GTK_WINDOW (user_data))
gtk_window_set_transient_for (GTK_WINDOW (shortcuts_window), GTK_WINDOW (user_data));
- gtk_window_present (GTK_WINDOW (shortcuts_window));
+ gtk_window_present_with_time (GTK_WINDOW (shortcuts_window), gtk_get_current_event_time ());
}
void
@@ -2373,7 +2373,7 @@ window_cmd_tabs_detach (GSimpleAction *action,
ephy_embed_container_add_child (EPHY_EMBED_CONTAINER (new_window), embed, 0, FALSE);
g_object_unref (embed);
- gtk_window_present (GTK_WINDOW (new_window));
+ gtk_window_present_with_time (GTK_WINDOW (new_window), gtk_get_current_event_time ());
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]