summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2012-11-15 11:34:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-15 13:55:00 +0100
commit46fe591a534d85090ff94136598a9272f1e0c20a (patch)
tree2517aabc293aef5f3fdf62450356e26d9c06e5ca /src/plugins/platforms/windows
parent45fecb24723e35a8298e388d0b97f1bc63ec5693 (diff)
Windows: Fixed mouse events related to size grips
The code which was adapted from Qt4 seems not to work as expected on current Windows versions. There are no additional mouse move events after releasing the mouse button from the size grip. One special behaviour in regards to SizeGrips here seems to be that there is no WM_LBUTTONUP message but a WM_MOUSEMOVE received when the mouse button is released from the size grip. Due to mouse event handling in the Windows plugin that event triggers the desired mouse release event so everything should be fine. With the previous implementation the behaviour from the bug report can be explained by the fact, that the mouseMove event is eaten in qwindowsmousehandler and so the second mouse click isn't even delivered. Basically the first click triggers the press event without a release and the second click does not trigger a press but a release event. Task-number: QTBUG-27864 Change-Id: I987c6e01dec4a6b6189ed30959daf7a2fcc17df6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index 2f2d5d2c59..d202da1d31 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -245,15 +245,6 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
if (QWindowsContext::verboseEvents)
qDebug() << "Releasing automatic mouse capture " << window;
}
- // Eat mouse move after size grip drag.
- if (msg.message == WM_MOUSEMOVE) {
- if (platformWindow->testFlag(QWindowsWindow::SizeGripOperation)) {
- MSG mouseMsg;
- while (PeekMessage(&mouseMsg, platformWindow->handle(), WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE)) ;
- platformWindow->clearFlag(QWindowsWindow::SizeGripOperation);
- return true;
- }
- }
const bool hasCapture = platformWindow->hasMouseCapture();
const bool currentNotCapturing = hasCapture && currentWindowUnderMouse != window;