diff --git a/Flow.Launcher.Plugin/SharedModels/CursorInfo.cs b/Flow.Launcher.Plugin/SharedModels/CursorInfo.cs
deleted file mode 100644
index 720bf2ae3..000000000
--- a/Flow.Launcher.Plugin/SharedModels/CursorInfo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System.Drawing;
-using System.Runtime.InteropServices;
-using Windows.Win32;
-
-namespace Flow.Launcher.Plugin.SharedModels;
-
-///
-/// Contains full information about a cursor.
-///
-///
-/// Use this class to replace the System.Windows.Forms.Cursor class which can cause possible System.PlatformNotSupportedException.
-///
-public class CursorInfo
-{
- ///
- /// Gets the current position of the cursor in screen coordinates.
- ///
- public static Point Position
- {
- get
- {
- if (!PInvoke.GetCursorPos(out var pt))
- {
- Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
- }
- return pt;
- }
- }
-}
diff --git a/Flow.Launcher.Plugin/SharedModels/MonitorInfo.cs b/Flow.Launcher.Plugin/SharedModels/MonitorInfo.cs
index 22e09e2f5..6808c9c91 100644
--- a/Flow.Launcher.Plugin/SharedModels/MonitorInfo.cs
+++ b/Flow.Launcher.Plugin/SharedModels/MonitorInfo.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Windows;
using Windows.Win32;
@@ -102,7 +101,11 @@ public class MonitorInfo
/// The display monitor that contains the cursor, or null if no monitor is found.
public static unsafe MonitorInfo GetCursorDisplayMonitor()
{
- var cursorMonitor = PInvoke.MonitorFromPoint(CursorInfo.Position, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST);
+ if (!PInvoke.GetCursorPos(out var pt))
+ {
+ Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
+ }
+ var cursorMonitor = PInvoke.MonitorFromPoint(pt, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST);
MonitorInfo cursorMonitorInfo = null;
var callback = new MONITORENUMPROC((monitor, deviceContext, rect, data) =>
{