[geary/geary-0.12] Update fix for broken composer after clicking on mailto links.



commit 2a7e0b55421496f9763f294979bb11f55b0a44f3
Author: Michael James Gratton <mike vee net>
Date:   Wed Feb 7 15:44:20 2018 +1100

    Update fix for broken composer after clicking on mailto links.
    
    This updates commit 417f02b82 to use fix suggested by Carlos Garcia Campos
    in the WebKitGTK bug.
    
    Bug 771504.

 src/client/application/geary-controller.vala |   13 +------------
 src/client/components/client-web-view.vala   |   11 ++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 52dfe93..3012403 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -2973,18 +2973,7 @@ public class GearyController : Geary.BaseObject {
 
     private void on_link_activated(string uri) {
         if (uri.down().has_prefix(Geary.ComposedEmail.MAILTO_SCHEME)) {
-            // We need to invoke this from idle to break the call
-            // chain from the WebKit signal which originally caused
-            // this handler to be invoked, otherwise the WebKit
-            // WebProcess will deadlock, and the resulting composer
-            // will be useless. See Geary Bug 771504
-            // <https://bugzilla.gnome.org/show_bug.cgi?id=771504>
-            // and WebKitGTK Bug 182528
-            // <https://bugs.webkit.org/show_bug.cgi?id=182528>
-            Idle.add(() => {
-                    compose_mailto(uri);
-                    return Source.REMOVE;
-                });
+            compose_mailto(uri);
         } else {
             open_uri(uri);
         }
diff --git a/src/client/components/client-web-view.vala b/src/client/components/client-web-view.vala
index 274cb3d..f139b53 100644
--- a/src/client/components/client-web-view.vala
+++ b/src/client/components/client-web-view.vala
@@ -469,8 +469,17 @@ public class ClientWebView : WebKit.WebView {
             case WebKit.NavigationType.LINK_CLICKED:
                 // Let the app know a user activated a link, but don't
                 // try to load it ourselves.
-                link_activated(nav_policy.request.uri);
+
+                // We need to call ignore() before emitting the signal
+                // to unblock the WebKit WebProcess, otherwise the
+                // call chain for mailto links will cause the
+                // WebProcess to deadlock, and the resulting composer
+                // will be useless. See Geary Bug 771504
+                // <https://bugzilla.gnome.org/show_bug.cgi?id=771504>
+                // and WebKitGTK Bug 182528
+                // <https://bugs.webkit.org/show_bug.cgi?id=182528>
                 policy.ignore();
+                link_activated(nav_policy.request.uri);
                 break;
 
             default:


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