|
@@ -5,7 +5,8 @@ using System.Diagnostics.CodeAnalysis;
|
|
|
using System.Runtime.InteropServices;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Input;
|
|
|
-
|
|
|
+using System.Windows.Threading;
|
|
|
+
|
|
|
namespace PixiEditor.Helpers
|
|
|
{
|
|
|
public delegate void MouseUpEventHandler(object sender, Point p, MouseButton button);
|
|
@@ -90,8 +91,9 @@ namespace PixiEditor.Helpers
|
|
|
{
|
|
|
|
|
|
MouseButton button = wParam == WM_LBUTTONUP ? MouseButton.Left
|
|
|
- : wParam == WM_MBUTTONUP ? MouseButton.Middle : MouseButton.Right;
|
|
|
- MouseUp.Invoke(null, new Point(mouseHookStruct.Pt.X, mouseHookStruct.Pt.Y), button);
|
|
|
+ : wParam == WM_MBUTTONUP ? MouseButton.Middle : MouseButton.Right;
|
|
|
+ Dispatcher.CurrentDispatcher.BeginInvoke(() =>
|
|
|
+ MouseUp.Invoke(null, new Point(mouseHookStruct.Pt.X, mouseHookStruct.Pt.Y), button));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -139,4 +141,4 @@ namespace PixiEditor.Helpers
|
|
|
public IntPtr DwExtraInfo;
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|