mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
added sanity checks for dragmove for actual button being pressed
This commit is contained in:
parent
5cc6d866ea
commit
1c5726245a
@ -9,6 +9,7 @@ using System.Windows.Controls;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using MahApps.Metro.Controls;
|
using MahApps.Metro.Controls;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Web.WebView2.Wpf;
|
using Microsoft.Web.WebView2.Wpf;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using Wabbajack.Common;
|
using Wabbajack.Common;
|
||||||
@ -25,7 +26,6 @@ public partial class BrowserWindow : MetroWindow
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
|
||||||
_disposable = new CompositeDisposable();
|
_disposable = new CompositeDisposable();
|
||||||
_serviceProvider = serviceProvider;
|
_serviceProvider = serviceProvider;
|
||||||
Browser = _serviceProvider.GetRequiredService<WebView2>();
|
Browser = _serviceProvider.GetRequiredService<WebView2>();
|
||||||
@ -43,7 +43,10 @@ public partial class BrowserWindow : MetroWindow
|
|||||||
|
|
||||||
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
|
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)
|
private void BrowserWindow_OnActivated(object sender, EventArgs e)
|
||||||
|
@ -8,6 +8,7 @@ using System.Windows.Input;
|
|||||||
using DynamicData.Binding;
|
using DynamicData.Binding;
|
||||||
using MahApps.Metro.Controls;
|
using MahApps.Metro.Controls;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using NLog;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using Wabbajack.Common;
|
using Wabbajack.Common;
|
||||||
using Wabbajack.Messages;
|
using Wabbajack.Messages;
|
||||||
@ -144,7 +145,10 @@ namespace Wabbajack
|
|||||||
|
|
||||||
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
|
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
this.DragMove();
|
if (e.LeftButton == MouseButtonState.Pressed)
|
||||||
|
{
|
||||||
|
this.DragMove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user