- Timestamp:
- Jan 28, 2010, 7:19:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r452 r483 1673 1673 #endif 1674 1674 1675 // Compress mouse move events1676 if (qmsg.msg == WM_MOUSEMOVE) {1677 QMSG mouseMsg;1678 mouseMsg.msg = WM_NULL;1679 while (WinPeekMsg(0, &mouseMsg, qmsg.hwnd, WM_MOUSEMOVE,1680 WM_MOUSEMOVE, PM_NOREMOVE)) {1681 if (mouseMsg.mp2 != qmsg.mp2)1682 break; // leave the message in the queue because1683 // the key state has changed1684 // Remove the mouse move message1685 WinPeekMsg(0, &mouseMsg, qmsg.hwnd, WM_MOUSEMOVE,1686 WM_MOUSEMOVE, PM_REMOVE);1687 }1688 // Update the passed in QMSG structure with the1689 // most recent one.1690 if (mouseMsg.msg != WM_NULL) {1691 PQMSG pqmsg = (PQMSG)&qmsg;1692 pqmsg->mp1 = mouseMsg.mp1;1693 pqmsg->mp2 = mouseMsg.mp2;1694 pqmsg->time = mouseMsg.time;1695 pqmsg->ptl.x = (short)SHORT1FROMMP(mouseMsg.mp1);1696 pqmsg->ptl.y = (short)SHORT2FROMMP(mouseMsg.mp1);1697 WinMapWindowPoints(pqmsg->hwnd, HWND_DESKTOP, &pqmsg->ptl, 1);1698 // flip y coordinate1699 pqmsg->ptl.y = QApplication::desktop()->height() - (pqmsg->ptl.y + 1);1700 }1701 }1702 1703 1675 for (i = 0; mouseTbl[i] && (ULONG)mouseTbl[i] != qmsg.msg; i += 3) 1704 1676 ; … … 1813 1785 1814 1786 gpos = qmsg.ptl; 1787 1815 1788 1816 1789 Q_ASSERT(testAttribute(Qt::WA_WState_Created)); 1817 1818 POINTL curPos = gpos;1819 WinMapWindowPoints(internalWinId(), HWND_DESKTOP, &curPos, 1);1820 1821 pos.rx() = curPos.x;1822 pos.ry() = curPos.y;1823 pos = d_func()->mapFromWS(pos);1824 1790 } else { 1825 1791 if (type == QEvent::MouseButtonPress && !isActiveWindow()) … … 1827 1793 1828 1794 gpos = qmsg.ptl; 1829 pos = mapFromGlobal(QPoint(gpos.x, gpos.y));1795 pos = ; 1830 1796 1831 1797 // mouse button pressed
Note:
See TracChangeset
for help on using the changeset viewer.