summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_win.cpp
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-02-17 09:07:51 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-02-17 09:32:51 (GMT)
commit234e849cfc85d5618d2f703bb92701042993d2de (patch)
treea3821830de3f3db3917890a03db8c3f8971b87cc /src/gui/kernel/qapplication_win.cpp
parent8776b276a828005f8b1ebfddf4d3e7a63f268866 (diff)
downloadQt-234e849cfc85d5618d2f703bb92701042993d2de.zip
Qt-234e849cfc85d5618d2f703bb92701042993d2de.tar.gz
Qt-234e849cfc85d5618d2f703bb92701042993d2de.tar.bz2
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
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r--src/gui/kernel/qapplication_win.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index b71a1bb..31d245f 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -2984,7 +2984,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);