[epiphany/mcatanzaro/752: 1/2] window: unfullscreen on process termination
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/752: 1/2] window: unfullscreen on process termination
- Date: Wed, 1 May 2019 19:13:29 +0000 (UTC)
commit f526de120045e0dd05684fb49e18be67c44d4e03
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed May 1 14:09:32 2019 -0500
window: unfullscreen on process termination
If we crash while fullscreen, we should leave fullscreen mode.
Fixes #752
src/ephy-window.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index f84b628a8..b0d6d3ff1 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1841,6 +1841,14 @@ ephy_window_mouse_target_changed_cb (WebKitWebView *web_view,
window->hit_test_result = g_object_ref (hit_test_result);
}
+static void
+web_process_terminated_cb (EphyWebView *web_view,
+ WebKitWebProcessTerminationReason reason,
+ EphyWindow *window)
+{
+ gtk_window_unfullscreen (GTK_WINDOW (window));
+}
+
static void
ephy_window_set_is_popup (EphyWindow *window,
gboolean is_popup)
@@ -2361,6 +2369,9 @@ ephy_window_connect_active_embed (EphyWindow *window)
g_signal_connect_object (view, "mouse-target-changed",
G_CALLBACK (ephy_window_mouse_target_changed_cb),
window, 0);
+ g_signal_connect_object (view, "web-process-terminated",
+ G_CALLBACK (web_process_terminated_cb),
+ window, 0);
ephy_mouse_gesture_controller_set_web_view (window->mouse_gesture_controller, web_view);
@@ -2423,13 +2434,15 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_address),
window);
-
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (populate_context_menu),
window);
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (ephy_window_mouse_target_changed_cb),
window);
+ g_signal_handlers_disconnect_by_func (view,
+ G_CALLBACK (web_process_terminated_cb),
+ window);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]