Changeset 603
- Timestamp:
- Feb 25, 2010, 4:31:14 AM (15 years ago)
- Location:
- trunk/src/gui
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r569 r603 433 433 } 434 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 435 453 // application no-grab option 436 454 bool qt_nograb() … … 676 694 { 677 695 // flip y coordinate 678 int y = desktop()->height() - (pos.y() + 1);696 int y = height() - (pos.y() + 1); 679 697 POINTL ptl = { pos.x(), y }; 680 698 HWND hwnd = WinWindowFromPoint(HWND_DESKTOP, &ptl, FALSE); … … 753 771 } 754 772 // flip y coordinate 755 ptl.y = QApplication::desktop()->height() - (ptl.y + 1);773 ptl.y = height() - (ptl.y + 1); 756 774 } 757 775 … … 1551 1569 WinQueryPointerPos(HWND_DESKTOP, &curPos); 1552 1570 // flip y coordinate 1553 curPos.y = q _func()->desktop()->height() - (curPos.y + 1);1571 curPos.y = qheight() - (curPos.y + 1); 1554 1572 1555 1573 if (QApplicationPrivate::popupWidgets->isEmpty()) { … … 1998 2016 POINTL ptl = gpos; 1999 2017 // flip y coordinate 2000 ptl.y = QApplication::desktop()->height() - (ptl.y + 1);2018 ptl.y = height() - (ptl.y + 1); 2001 2019 WinMapWindowPoints(HWND_DESKTOP, hwndTarget, &ptl, 1); 2002 2020 WinPostMsg(hwndTarget, qmsg.msg, … … 2099 2117 // get a confusing behavior (too many lines scrolled etc.). 2100 2118 { 2101 int devh = QApplication::desktop()->height();2119 int devh = height(); 2102 2120 QMSG wheelMsg; 2103 2121 while (WinPeekMsg(0, &wheelMsg, qmsg.hwnd, qmsg.msg, qmsg.msg, PM_NOREMOVE)) { … … 2328 2346 WinQueryWindowPos(fId, &swp); 2329 2347 // flip y coordinate 2330 swp.y = QApplication::desktop()->height() - (swp.y + swp.cy);2348 swp.y = height() - (swp.y + swp.cy); 2331 2349 QTLWExtra *top = d_func()->topData(); 2332 2350 swp.x += top->frameStrut.left(); -
trunk/src/gui/kernel/qcursor_pm.cpp
r564 r603 121 121 WinQueryPointerPos(HWND_DESKTOP, &p); 122 122 // flip y coordinate 123 p.y = QApplication::desktop()->height() - (p.y + 1);123 p.y = height() - (p.y + 1); 124 124 return QPoint(p.x, p.y); 125 125 } … … 128 128 { 129 129 // flip y coordinate 130 y = QApplication::desktop()->height() - (y + 1);130 y = height() - (y + 1); 131 131 WinSetPointerPos(HWND_DESKTOP, x, y); 132 132 } -
trunk/src/gui/kernel/qdnd_pm.cpp
r580 r603 473 473 // flip y coordinate 474 474 QPoint pnt(info->xDrop, info->yDrop); 475 pnt.setY( QApplication::desktop()->height() - (pnt.y() + 1));475 pnt.setY(height() - (pnt.y() + 1)); 476 476 pnt = widget->mapFromGlobal(pnt); 477 477 … … 688 688 // flip y coordinate 689 689 QPoint pnt(info->xDrop, info->yDrop); 690 pnt.setY( QApplication::desktop()->height() - (pnt.y() + 1));690 pnt.setY(height() - (pnt.y() + 1)); 691 691 pnt = widget->mapFromGlobal(pnt); 692 692 if (dragData->lastDragOverWidget != widget) -
trunk/src/gui/kernel/qwidget_pm.cpp
r569 r603 284 284 // first, process areas placed outside the screen bounds 285 285 if (flags & PWO_Screen) { 286 RECTL rclScr = { 0, 0, QApplication::desktop()->width(), 287 QApplication::desktop()->height() }; 286 RECTL rclScr = { 0, 0, qt_display_width(), qt_display_height() }; 288 287 WinMapWindowPoints(HWND_DESKTOP, hwnd, (PPOINTL) &rclScr, 2); 289 288 // rough check of whether some window part is outside bounds … … 1540 1539 WinMapWindowPoints(internalWinId(), HWND_DESKTOP, &ptl, 1); 1541 1540 // flip y (global) coordinate 1542 ptl.y = QApplication::desktop()->height() - (ptl.y + 1);1541 ptl.y = height() - (ptl.y + 1); 1543 1542 return QPoint(ptl.x, ptl.y); 1544 1543 } … … 1557 1556 ptl.x = pos.x(); 1558 1557 // flip y (global) coordinate 1559 ptl.y = QApplication::desktop()->height() - (pos.y() + 1);1558 ptl.y = height() - (pos.y() + 1); 1560 1559 WinMapWindowPoints(HWND_DESKTOP, internalWinId(), &ptl, 1); 1561 1560 // flip y (local) coordinate … … 1756 1755 WinSetWindowPos(fId, HWND_TOP, r.left(), 1757 1756 // flip y coodrinate 1758 QApplication::desktop()->height() - (r.top() + r.height()),1757 height() - (r.top() + r.height()), 1759 1758 r.width(), r.height(), fl); 1760 1759 } else { … … 2117 2116 data.crect.setRect(x, y, w, h); 2118 2117 } else if (q->isWindow()) { 2119 int sh = QApplication::desktop()->height();2118 int sh = height(); 2120 2119 QRect fs(frameStrut()); 2121 2120 if (extra) { … … 2408 2407 WinQueryWindowPos(data.winid, &cswp); 2409 2408 // flip y coordinates 2410 swp.y = QApplication::desktop()->height() - (swp.y + swp.cy);2409 swp.y = height() - (swp.y + swp.cy); 2411 2410 cswp.y = swp.cy - (cswp.y + cswp.cy); 2412 2411 QRect &fs = top->frameStrut; -
trunk/src/gui/kernel/qwindowdefs_pm.h
r580 r603 83 83 Q_GUI_EXPORT HPS qt_display_ps(); 84 84 85 86 87 85 88 Q_GUI_EXPORT QWidget *qWidgetFromHWND(HWND hwnd); 86 89 -
trunk/src/gui/util/qsystemtrayicon_pm.cpp
r564 r603 121 121 RECTL rcl; 122 122 if (xstQuerySysTrayIconRect(winId(), 0, &rcl)) { 123 int sh = QApplication::desktop()->height();123 int sh = height(); 124 124 // flip y coordinates 125 125 rcl.yTop = sh - rcl.yTop; … … 213 213 QPoint gpos(pMsg->ptsPointerPos.x, 214 214 // flip y coordinate 215 QApplication::desktop()->height() - 216 (pMsg->ptsPointerPos.y + 1)); 215 qt_display_height() - (pMsg->ptsPointerPos.y + 1)); 217 216 q->contextMenu()->popup(gpos); 218 217 q->contextMenu()->activateWindow();
Note:
See TracChangeset
for help on using the changeset viewer.