disable default drag handling

This commit is contained in:
pypy
2020-06-28 16:39:15 +09:00
parent 9b6b42e11e
commit 88990fd82e
4 changed files with 27 additions and 0 deletions
+1
View File
@@ -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,
+23
View File
@@ -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 <https://opensource.org/licenses/MIT>.
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<DraggableRegion> regions)
{
}
}
}
+1
View File
@@ -128,6 +128,7 @@
<Compile Include="Discord.cs" />
<Compile Include="CpuMonitor.cs" />
<Compile Include="Browser.cs" />
<Compile Include="NoopDragHandler.cs" />
<Compile Include="RenderHandler.cs" />
<Compile Include="SQLite.cs" />
<Compile Include="VRForm.cs">
+2
View File
@@ -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,