Improve mouse move handler

This commit is contained in:
Sine Striker 2023-08-26 16:11:00 +08:00
parent 2d639071cc
commit 27fed74f10
1 changed files with 2 additions and 1 deletions

View File

@ -984,7 +984,8 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
}
case WM_MOUSEMOVE: {
const WindowPart previousWindowPart = getHittedWindowPart(data.hitTestResult.first.value_or(HTNOWHERE));
if (previousWindowPart == WindowPart::ChromeButton) {
const WindowPart currentWindowPart = getHittedWindowPart(data.hitTestResult.second.value_or(HTNOWHERE));
if (previousWindowPart == WindowPart::ChromeButton && currentWindowPart == WindowPart::ClientArea) {
std::ignore = listenForMouseLeave(hWnd, false);
}
break;