Improve mouse move handler (#271)

This commit is contained in:
SineStriker 2023-08-26 16:21:48 +08:00 committed by GitHub
parent 2d639071cc
commit 102bf93b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;