added sanity checks for dragmove for actual button being pressed

This commit is contained in:
JanuarySnow 2024-07-17 14:03:05 +01:00
parent 5cc6d866ea
commit 1c5726245a
2 changed files with 10 additions and 3 deletions

View File

@ -9,6 +9,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using MahApps.Metro.Controls;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Web.WebView2.Wpf;
using ReactiveUI;
using Wabbajack.Common;
@ -25,7 +26,6 @@ public partial class BrowserWindow : MetroWindow
{
InitializeComponent();
_disposable = new CompositeDisposable();
_serviceProvider = serviceProvider;
Browser = _serviceProvider.GetRequiredService<WebView2>();
@ -43,7 +43,10 @@ public partial class BrowserWindow : MetroWindow
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
{
base.DragMove();
if (e.LeftButton == MouseButtonState.Pressed)
{
base.DragMove();
}
}
private void BrowserWindow_OnActivated(object sender, EventArgs e)

View File

@ -8,6 +8,7 @@ using System.Windows.Input;
using DynamicData.Binding;
using MahApps.Metro.Controls;
using Microsoft.Extensions.Logging;
using NLog;
using ReactiveUI;
using Wabbajack.Common;
using Wabbajack.Messages;
@ -144,7 +145,10 @@ namespace Wabbajack
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
if (e.LeftButton == MouseButtonState.Pressed)
{
this.DragMove();
}
}
}