mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[QuickAccent]Upgrade Vanara.Invoke dependencies to 3.4.11 (#22351)
This commit is contained in:
@@ -24,7 +24,7 @@ public struct Point
|
|||||||
Y = y;
|
Y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Point(System.Drawing.Point point)
|
public Point(Vanara.PInvoke.POINT point)
|
||||||
{
|
{
|
||||||
X = point.X;
|
X = point.X;
|
||||||
Y = point.Y;
|
Y = point.Y;
|
||||||
@@ -34,7 +34,7 @@ public struct Point
|
|||||||
|
|
||||||
public double Y { get; init; }
|
public double Y { get; init; }
|
||||||
|
|
||||||
public static implicit operator Point(System.Drawing.Point point) => new Point(point.X, point.Y);
|
public static implicit operator Point(Vanara.PInvoke.POINT point) => new Point(point.X, point.Y);
|
||||||
|
|
||||||
public static Point operator /(Point point, double divider)
|
public static Point operator /(Point point, double divider)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
|
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
|
||||||
<PackageReference Include="Vanara.PInvoke.User32" Version="3.3.15" />
|
<PackageReference Include="Vanara.PInvoke.User32" Version="3.4.11" />
|
||||||
<PackageReference Include="Vanara.PInvoke.Shell32" Version="3.3.15" />
|
<PackageReference Include="Vanara.PInvoke.Shell32" Version="3.4.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ internal static class WindowsFunctions
|
|||||||
User32.GUITHREADINFO guiInfo = new ();
|
User32.GUITHREADINFO guiInfo = new ();
|
||||||
guiInfo.cbSize = (uint)Marshal.SizeOf(guiInfo);
|
guiInfo.cbSize = (uint)Marshal.SizeOf(guiInfo);
|
||||||
User32.GetGUIThreadInfo(0, ref guiInfo);
|
User32.GetGUIThreadInfo(0, ref guiInfo);
|
||||||
System.Drawing.Point caretPosition = new System.Drawing.Point(guiInfo.rcCaret.left, guiInfo.rcCaret.top);
|
POINT caretPosition = new POINT(guiInfo.rcCaret.left, guiInfo.rcCaret.top);
|
||||||
User32.ClientToScreen(guiInfo.hwndCaret, ref caretPosition);
|
User32.ClientToScreen(guiInfo.hwndCaret, ref caretPosition);
|
||||||
|
|
||||||
if (caretPosition.X == 0)
|
if (caretPosition.X == 0)
|
||||||
{
|
{
|
||||||
System.Drawing.Point testPoint;
|
POINT testPoint;
|
||||||
User32.GetCaretPos(out testPoint);
|
User32.GetCaretPos(out testPoint);
|
||||||
return testPoint;
|
return testPoint;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user