[geary/wip/728002-webkit2: 34/48] Fix massive graphics corruptiom when WebViews are displayed.



commit f4f090e2398e5a389612160290ef7fa96876f6f9
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 305a606..2e93c21 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -155,11 +155,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 a4c3a1a..cd8f35a 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -189,6 +189,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]