diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-02-17 10:07:51 +0100 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2011-06-09 13:04:52 +0300 |
commit | e214c6fa5da0b139cfc35be105c8e678a8243dc9 (patch) | |
tree | 8612b5c295085a39f69fe36615ec5e1e93d1bc42 /src | |
parent | ee94fd65ce9e70795b86b35bcffa0d894ea3074f (diff) | |
download | qt4-tools-e214c6fa5da0b139cfc35be105c8e678a8243dc9.tar.gz |
Incorrect mouse coordinates used when compressing WM_MOUSEMOVE messages.
Use the coordinates passed in the LPARAM parameter, the pt passed with
the MSG is not always correct.
Task-number: QTBUG-7637
Reviewed-by: Denis
(cherry picked from commit 234e849cfc85d5618d2f703bb92701042993d2de)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication_win.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index aed6d02f65..4d30e20bc1 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -2982,7 +2982,10 @@ bool QETWidget::translateMouseEvent(const MSG &msg) // most recent one. msgPtr->lParam = mouseMsg.lParam; msgPtr->wParam = mouseMsg.wParam; - msgPtr->pt = mouseMsg.pt; + // Extract the x,y coordinates from the lParam as we do in the WndProc + msgPtr->pt.x = GET_X_LPARAM(mouseMsg.lParam); + msgPtr->pt.y = GET_Y_LPARAM(mouseMsg.lParam); + ClientToScreen(msg.hwnd, &(msgPtr->pt)); // Remove the mouse move message PeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE); |