mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 11:44:59 +00:00
perf: return HTCLIENT
directly when window is fullscreen or maximized
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
af9cf6ba6a
commit
c62b4a031f
1 changed files with 5 additions and 1 deletions
|
@ -112,6 +112,11 @@ namespace SourceGit.Native
|
|||
// Custom WM_NCHITTEST
|
||||
if (msg == 0x0084)
|
||||
{
|
||||
handled = true;
|
||||
|
||||
if (window.WindowState == WindowState.FullScreen || window.WindowState == WindowState.Maximized)
|
||||
return (IntPtr)HitTest.HTCLIENT;
|
||||
|
||||
var p = IntPtrToPixelPoint(lParam);
|
||||
GetWindowRect(hWnd, out var rcWindow);
|
||||
|
||||
|
@ -135,7 +140,6 @@ namespace SourceGit.Native
|
|||
HitTest.HTBOTTOMLEFT, HitTest.HTBOTTOM, HitTest.HTBOTTOMRIGHT
|
||||
};
|
||||
|
||||
handled = true;
|
||||
return (IntPtr)(zones[row * 3 + col]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue