Skip to content

Commit

Permalink
Try the idea in #60
Browse files Browse the repository at this point in the history
  • Loading branch information
NotYoojun committed May 22, 2024
1 parent 5c8e92a commit 7135bdf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions samples/FlyoutExample/FlyoutExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="iNKORE.UI.WPF" Version="1.2.3.1" />
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.9.26.3" />
<PackageReference Include="iNKORE.UI.WPF" Version="1.2.4" />
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.9.28" />
</ItemGroup>

</Project>
9 changes: 7 additions & 2 deletions source/iNKORE.UI.WPF.Modern/Helpers/Styles/SnapLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,13 @@ private bool IsOverButton(IntPtr wParam, IntPtr lParam)
{
try
{
int positionX = lParam.ToInt32() & 0xffff;
int positionY = lParam.ToInt32() >> 16;
// int positionX = lParam.ToInt32() & 0xffff;
// int positionY = lParam.ToInt32() >> 16;

// https://github.com/iNKORE-NET/UI.WPF.Modern/issues/60#issuecomment-2121990538
uint lparam32 = (uint)lParam.ToInt64(); short positionX = (short)(lparam32 & 0xffff);
short positionY = (short)((lparam32 >> 16) & 0xffff);


Rect rect = new Rect(_button.PointToScreen(new Point()),
new Size(_button.Width * _dpiScale, _button.Height * _dpiScale));
Expand Down

0 comments on commit 7135bdf

Please sign in to comment.