summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsmousehandler.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-10-19 08:19:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-10-22 17:25:01 +0000
commitc0538857358e57c1551f7d10c07a9bb80d848cd7 (patch)
treedd20ef13ead6787c2c2512110f4c9797e1056fa3 /src/plugins/platforms/windows/qwindowsmousehandler.cpp
parent903666a6027cec25010a99c05824df14ce26e7bf (diff)
Windows/QPA: Fix receiving mouse clicks after double clicks in QQuickWidget
The Qt QPA does not handle native double clicks as such; change the plugin not to send them. For Ink, remove the doubleclick detection. For the old code path, map them to Press. Fixes: QTBUG-70999 Change-Id: I54b858f9e146bf325a861554d5ef74143db7d2b7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsmousehandler.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index c1c275144f..fcdd179a31 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -207,26 +207,26 @@ static inline MouseEvent eventFromMsg(const MSG &msg)
return {QEvent::MouseButtonPress, Qt::LeftButton};
case WM_LBUTTONUP:
return {QEvent::MouseButtonRelease, Qt::LeftButton};
- case WM_LBUTTONDBLCLK:
- return {QEvent::MouseButtonDblClick, Qt::LeftButton};
+ case WM_LBUTTONDBLCLK: // Qt QPA does not handle double clicks, send as press
+ return {QEvent::MouseButtonPress, Qt::LeftButton};
case WM_MBUTTONDOWN:
return {QEvent::MouseButtonPress, Qt::MidButton};
case WM_MBUTTONUP:
return {QEvent::MouseButtonRelease, Qt::MidButton};
case WM_MBUTTONDBLCLK:
- return {QEvent::MouseButtonDblClick, Qt::MidButton};
+ return {QEvent::MouseButtonPress, Qt::MidButton};
case WM_RBUTTONDOWN:
return {QEvent::MouseButtonPress, Qt::RightButton};
case WM_RBUTTONUP:
return {QEvent::MouseButtonRelease, Qt::RightButton};
case WM_RBUTTONDBLCLK:
- return {QEvent::MouseButtonDblClick, Qt::RightButton};
+ return {QEvent::MouseButtonPress, Qt::RightButton};
case WM_XBUTTONDOWN:
return {QEvent::MouseButtonPress, extraButton(msg.wParam)};
case WM_XBUTTONUP:
return {QEvent::MouseButtonRelease, extraButton(msg.wParam)};
case WM_XBUTTONDBLCLK:
- return {QEvent::MouseButtonDblClick, extraButton(msg.wParam)};
+ return {QEvent::MouseButtonPress, extraButton(msg.wParam)};
case WM_NCMOUSEMOVE:
return {QEvent::NonClientAreaMouseMove, Qt::NoButton};
case WM_NCLBUTTONDOWN:
@@ -234,19 +234,19 @@ static inline MouseEvent eventFromMsg(const MSG &msg)
case WM_NCLBUTTONUP:
return {QEvent::NonClientAreaMouseButtonRelease, Qt::LeftButton};
case WM_NCLBUTTONDBLCLK:
- return {QEvent::NonClientAreaMouseButtonDblClick, Qt::LeftButton};
+ return {QEvent::NonClientAreaMouseButtonPress, Qt::LeftButton};
case WM_NCMBUTTONDOWN:
return {QEvent::NonClientAreaMouseButtonPress, Qt::MidButton};
case WM_NCMBUTTONUP:
return {QEvent::NonClientAreaMouseButtonRelease, Qt::MidButton};
case WM_NCMBUTTONDBLCLK:
- return {QEvent::NonClientAreaMouseButtonDblClick, Qt::MidButton};
+ return {QEvent::NonClientAreaMouseButtonPress, Qt::MidButton};
case WM_NCRBUTTONDOWN:
return {QEvent::NonClientAreaMouseButtonPress, Qt::RightButton};
case WM_NCRBUTTONUP:
return {QEvent::NonClientAreaMouseButtonRelease, Qt::RightButton};
case WM_NCRBUTTONDBLCLK:
- return {QEvent::NonClientAreaMouseButtonDblClick, Qt::RightButton};
+ return {QEvent::NonClientAreaMouseButtonPress, Qt::RightButton};
default: // WM_MOUSELEAVE
break;
}