mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-04 05:46:07 +02:00
disable default drag handling
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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">
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user