diff --git a/Directory.Build.props b/Directory.Build.props index a7a65c6b..6eada46f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,7 +10,7 @@ 2.0.0.0 2.0.0.0 - 3.120.5 + 3.120.6 OutSystems WebViewControl Copyright © OutSystems 2023 diff --git a/SampleWebView.Avalonia/MainWindow.xaml.cs b/SampleWebView.Avalonia/MainWindow.xaml.cs index 9dce859b..4bc7ecc2 100755 --- a/SampleWebView.Avalonia/MainWindow.xaml.cs +++ b/SampleWebView.Avalonia/MainWindow.xaml.cs @@ -7,7 +7,6 @@ namespace SampleWebView.Avalonia { internal class MainWindow : Window { public MainWindow() { - WebView.Settings.OsrEnabled = false; WebView.Settings.LogFile = "ceflog.txt"; AvaloniaXamlLoader.Load(this); diff --git a/WebViewControl/GlobalSettings.cs b/WebViewControl/GlobalSettings.cs index 427fa6d4..1482b352 100644 --- a/WebViewControl/GlobalSettings.cs +++ b/WebViewControl/GlobalSettings.cs @@ -9,7 +9,7 @@ public class GlobalSettings { private bool persistCache; private bool enableErrorLogOnly; - private bool osrEnabled = true; + private bool osrEnabled = false; private string userAgent; private string logFile; private string cachePath = Path.Combine(Path.GetTempPath(), "WebView" + Guid.NewGuid().ToString().Replace("-", null) + DateTime.UtcNow.Ticks); @@ -65,6 +65,11 @@ public string LogFile { } } + /// + /// Set to true to enable off-screen rendering support. + /// Do not enable this setting if the application does not use off-screen rendering + /// as it may reduce rendering performance and cause some issues. + /// public bool OsrEnabled { get => osrEnabled; set { diff --git a/WebViewControl/WebView.cs b/WebViewControl/WebView.cs index 579de43d..25b0551f 100644 --- a/WebViewControl/WebView.cs +++ b/WebViewControl/WebView.cs @@ -140,7 +140,7 @@ private void Initialize() { chromium.KeyboardHandler = new InternalKeyboardHandler(this); if (!Settings.OsrEnabled) { - // having the handler (by default) seems to cause some focus troubles, enable only osr disabled + // having the handler (by default) seems to cause some focus troubles, enable only when osr disabled chromium.FocusHandler = new InternalFocusHandler(this); } diff --git a/WebViewControl/WebViewControl.csproj b/WebViewControl/WebViewControl.csproj index adbe95a1..73012349 100644 --- a/WebViewControl/WebViewControl.csproj +++ b/WebViewControl/WebViewControl.csproj @@ -19,23 +19,6 @@ true - - - - - - - - - - - - - - - - - diff --git a/tests/Tests.WebView/App.xaml.cs b/tests/Tests.WebView/App.xaml.cs index ebccc3d1..6c0c451d 100644 --- a/tests/Tests.WebView/App.xaml.cs +++ b/tests/Tests.WebView/App.xaml.cs @@ -8,7 +8,6 @@ public class App : Application { public App() { } public override void Initialize() { - WebViewControl.WebView.Settings.OsrEnabled = false; AvaloniaXamlLoader.Load(this); } }