[epiphany/gnome-3-32] window: unfullscreen on process termination



commit ae83ec16c937e218d0bad41b1feeb4fabfe78943
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed May 1 19:09:32 2019 +0000

    window: unfullscreen on process termination
    
    If we crash while fullscreen, we should leave fullscreen mode.
    
    Fixes #752
    
    
    (cherry picked from commit 17c887ad03051b55d7fb5311c14356a57e241964)

 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 5e3b61ba7..121d8c003 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1806,6 +1806,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)
@@ -2326,6 +2334,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);
 
@@ -2388,13 +2399,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]