Skip to content

Commit

Permalink
fix Hex-Dragon#5655: 鼠标保持移动时抬起仍可继续改变窗口大小
Browse files Browse the repository at this point in the history
  • Loading branch information
Open-KFC committed Mar 6, 2025
1 parent 503244a commit 16755cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Plain Craft Launcher 2/Controls/MyResizer.vb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Public Class MyResizer
End Sub

Private Sub updateMouseDown()
Dim flag As Boolean = Mouse.LeftButton = MouseButtonState.Released
Dim flag = (GetAsyncKeyState(&H1) And &H8000) = 0 '调用原生API判断鼠标是否抬起,如果使用WPF的API的话鼠标不在窗口上时不会更新状态 (#5655)
If flag Then
resizeRight = False
resizeLeft = False
Expand All @@ -312,4 +312,5 @@ Public Class MyResizer

Private Declare Function GetCursorPos Lib "user32.dll" (<Out()> ByRef lpPoint As PointAPI) As Boolean

Private Declare Function GetAsyncKeyState Lib "user32.dll" (vKey As Integer) As Short
End Class

0 comments on commit 16755cd

Please sign in to comment.