diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-28 16:16:25 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-31 14:10:04 +0200 |
commit | f0379771528c71f477b68dfad3095518e4362872 (patch) | |
tree | 4a508b699e369d51c214dc4c6c6ce1cb597d7f8d /src/plugins/platforms/windows/qwindowscontext.cpp | |
parent | f9594cefef0d86b33d21319fefe4fa71049416c7 (diff) |
QWSI: Remove handleFrameStrutMouseEvent in favor of handleMouseEvent+type
The handleMouseEvent function already takes a QEvent::Type, where clients
pass in the corresponding mouse press/release/move type. The same applies
to the handleFrameStrutMouseEvent.
To avoid the chance that clients call these functions with a conflicting
event type (handleFrameStrutMouseEvent with MouseButtonPress instead of
NonClientAreaMouseButtonPress e.g.), we remove handleFrameStrutMouseEvent
altogether and just let clients use the handleMouseEvent function directly
with the correct event type.
Change-Id: I4a0241c39aedac0d2d8d5163ba05cde72605959c
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 6a377c5336..501561115c 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1466,13 +1466,8 @@ 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)) { - if (type == QEvent::NonClientAreaMouseButtonRelease) { - QWindowSystemInterface::handleFrameStrutMouseEvent(window, localPos, globalPos, - currentButtons, button, type, keyboardModifiers); - } else { - QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos, - currentButtons, button, type, keyboardModifiers); - } + QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos, + currentButtons, button, type, keyboardModifiers); } } if (d->m_systemInfo & QWindowsContext::SI_SupportsPointer) |