[epiphany/gnome-3-20] ephy-shell: Always focus the main window when loading tabs in Wayland
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-20] ephy-shell: Always focus the main window when loading tabs in Wayland
- Date: Tue, 17 May 2016 03:06:00 +0000 (UTC)
commit 9889700e473988b86ce1fba9c683234af1c7e647
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon May 16 22:03:51 2016 -0500
ephy-shell: Always focus the main window when loading tabs in Wayland
Else the window will never get focused, because most apps don't set
DESKTOP_STARTUP_ID when launching Epiphany and therefore we have no
plausible time to pass to gtk_window_present_with_time().
Note that gtk_window_present() on its own seems to do nothing.
https://bugzilla.gnome.org/show_bug.cgi?id=766284
src/ephy-shell.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 4543ca4..4ceb5d7 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -987,8 +987,12 @@ ephy_shell_open_uris_idle (OpenURIsData *data)
if (reusing_empty_tab || data->flags & EPHY_NEW_TAB_JUMP)
gtk_widget_grab_focus (GTK_WIDGET (embed));
- if (data->flags & EPHY_NEW_TAB_JUMP && ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (data->shell)) !=
EPHY_EMBED_SHELL_MODE_TEST)
- gtk_window_present_with_time (GTK_WINDOW (data->window), data->user_time);
+ if (data->flags & EPHY_NEW_TAB_JUMP && ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (data->shell)) !=
EPHY_EMBED_SHELL_MODE_TEST) {
+ if (data->user_time)
+ gtk_window_present_with_time (GTK_WINDOW (data->window), data->user_time);
+ else
+ gtk_window_present_with_time (GTK_WINDOW (data->window), time (NULL));
+ }
} else {
ephy_web_view_load_homepage (ephy_embed_get_web_view (embed));
ephy_window_activate_location (data->window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]