diff --git a/MainForm.cs b/MainForm.cs index c27fd872..f27a0765 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -39,6 +39,7 @@ namespace VRCX // Application.StartupPath + "/html/index.html" Browser = new ChromiumWebBrowser(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "html/index.html")) { + DragHandler = new NoopDragHandler(), BrowserSettings = { // UniversalAccessFromFileUrls = CefState.Enabled, diff --git a/NoopDragHandler.cs b/NoopDragHandler.cs new file mode 100644 index 00000000..53497067 --- /dev/null +++ b/NoopDragHandler.cs @@ -0,0 +1,23 @@ +// Copyright(c) 2019 pypy. All rights reserved. +// +// This work is licensed under the terms of the MIT license. +// For a copy, see . + +using System.Collections.Generic; +using CefSharp; +using CefSharp.Enums; + +namespace VRCX +{ + public class NoopDragHandler : IDragHandler + { + bool IDragHandler.OnDragEnter(IWebBrowser chromiumWebBrowser, IBrowser browser, IDragData dragData, DragOperationsMask mask) + { + return true; + } + + void IDragHandler.OnDraggableRegionsChanged(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IList regions) + { + } + } +} \ No newline at end of file diff --git a/VRCX.csproj b/VRCX.csproj index 9f3ae864..1a84374f 100644 --- a/VRCX.csproj +++ b/VRCX.csproj @@ -128,6 +128,7 @@ + diff --git a/VRForm.cs b/VRForm.cs index 89d35f22..2c71f84c 100644 --- a/VRForm.cs +++ b/VRForm.cs @@ -24,6 +24,7 @@ namespace VRCX // Browser1 = new ChromiumWebBrowser(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "html/vr.html?1")) { + DragHandler = new NoopDragHandler(), BrowserSettings = { // UniversalAccessFromFileUrls = CefState.Enabled, @@ -33,6 +34,7 @@ namespace VRCX }; Browser2 = new ChromiumWebBrowser(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "html/vr.html?2")) { + DragHandler = new NoopDragHandler(), BrowserSettings = { // UniversalAccessFromFileUrls = CefState.Enabled,