From 4be4ebdb1d3ed197dbd267e80f48d3dfe1c652f3 Mon Sep 17 00:00:00 2001 From: amaitland Date: Thu, 14 Jun 2018 22:11:56 +1000 Subject: [PATCH] WPF - Mouse Scroll becomes unresponsive Add Hack to CefSharpApp to allow for setting of disable-features command line arg Add the example command line args https://github.com/cefsharp/CefSharp/issues/2408 --- CefSharp.Core/Internals/CefSharpApp.h | 8 +++++++- CefSharp.Example/CefExample.cs | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CefSharp.Core/Internals/CefSharpApp.h b/CefSharp.Core/Internals/CefSharpApp.h index 9f2cb6980..eb470e0d6 100644 --- a/CefSharp.Core/Internals/CefSharpApp.h +++ b/CefSharp.Core/Internals/CefSharpApp.h @@ -110,9 +110,15 @@ namespace CefSharp CefString name = StringUtils::ToNative(kvp->Key); CefString value = StringUtils::ToNative(kvp->Value); + if (kvp->Key == "disable-features") + { + //Temp workaround so we can set the disable-features command line argument + // See https://github.com/cefsharp/CefSharp/issues/2408 + commandLine->AppendSwitchWithValue(name, value); + } // Right now the command line args handed to the application (global command line) have higher // precedence than command line args provided by the app - if(!commandLine->HasSwitch(name)) + else if(!commandLine->HasSwitch(name)) { commandLine->AppendSwitchWithValue(name, value); } diff --git a/CefSharp.Example/CefExample.cs b/CefSharp.Example/CefExample.cs index c7b820d2a..c521005e4 100644 --- a/CefSharp.Example/CefExample.cs +++ b/CefSharp.Example/CefExample.cs @@ -107,9 +107,13 @@ namespace CefSharp.Example { settings.WindowlessRenderingEnabled = true; + //https://github.com/cefsharp/CefSharp/issues/2408 + settings.CefCommandLineArgs.Add("disable-features", "TouchpadAndWheelScrollLatching,AsyncWheelEvents"); + settings.CefCommandLineArgs.Add("disable-blink-features", "RootLayerScrolling"); + //Disable Direct Composition to test https://github.com/cefsharp/CefSharp/issues/1634 //settings.CefCommandLineArgs.Add("disable-direct-composition", "1"); - + // DevTools doesn't seem to be working when this is enabled // http://magpcss.org/ceforum/viewtopic.php?f=6&t=14095 //settings.CefCommandLineArgs.Add("enable-begin-frame-scheduling", "1");