diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 78fd79c0eb0..6a377c53365 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1466,9 +1466,13 @@ void QWindowsContext::handleExitSizeMove(QWindow *window) ? QEvent::MouseButtonRelease : QEvent::NonClientAreaMouseButtonRelease; for (Qt::MouseButton button : {Qt::LeftButton, Qt::RightButton, Qt::MiddleButton}) { if (appButtons.testFlag(button) && !currentButtons.testFlag(button)) { - QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos, - currentButtons, button, type, - keyboardModifiers); + if (type == QEvent::NonClientAreaMouseButtonRelease) { + QWindowSystemInterface::handleFrameStrutMouseEvent(window, localPos, globalPos, + currentButtons, button, type, keyboardModifiers); + } else { + QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos, + currentButtons, button, type, keyboardModifiers); + } } } if (d->m_systemInfo & QWindowsContext::SI_SupportsPointer)