[geary/bug/728002-webkit2: 3/140] Fix massive graphics corruptiom when WebViews are displayed.



commit b183f9d91ca271006f0ec69e2764b6101a8f5033
Author: Michael James Gratton <mike vee net>
Date:   Mon Oct 10 11:18:52 2016 +1100

    Fix massive graphics corruptiom when WebViews are displayed.
    
    * src/client/application/geary-controller.vala
      (GearyController::open_async): Initialise WebKit default context here,
      rather than in GearyApplication::startup so it happens after GTK+ has
      been initialised.

 src/client/application/geary-application.vala |    5 +----
 src/client/application/geary-controller.vala  |    5 +++++
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index 11c1bb7..c29e025 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -191,11 +191,8 @@ public class GearyApplication : Gtk.Application {
         Geary.Logging.init();
         Date.init();
 
-        WebKit.WebContext context = WebKit.WebContext.get_default();
-        context.set_cache_model(WebKit.CacheModel.DOCUMENT_BROWSER);
-
         base.startup();
-        
+
         add_action_entries(action_entries, this);
     }
     
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 2d39231..200b6d5 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -188,6 +188,11 @@ public class GearyController : Geary.BaseObject {
         upgrade_dialog = new UpgradeDialog();
         upgrade_dialog.notify[UpgradeDialog.PROP_VISIBLE_NAME].connect(display_main_window_if_ready);
 
+        // Initialise global WebKit settings
+        WebKit.WebContext context = WebKit.WebContext.get_default();
+        context.set_process_model(WebKit.ProcessModel.SHARED_SECONDARY_PROCESS);
+        context.set_cache_model(WebKit.CacheModel.DOCUMENT_BROWSER);
+
         // Use a global avatar session because a cache must be used
         // per-session, and we don't want to have to load the cache
         // for each conversation load.


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