Changeset 603 for trunk/src/gui/kernel/qapplication_pm.cpp
- Timestamp:
- Feb 25, 2010, 4:31:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r569 r603 433 433 } 434 434 435 Q_GUI_EXPORT int qt_display_width() 436 { 437 // display resolution is constant for any given bootup 438 static LONG displayWidth = 0; 439 if (displayWidth == 0) 440 displayWidth = WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN); 441 return displayWidth; 442 } 443 444 Q_GUI_EXPORT int qt_display_height() 445 { 446 // display resolution is constant for any given bootup 447 static LONG displayHeight = 0; 448 if (displayHeight == 0) 449 displayHeight = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN); 450 return displayHeight; 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 = qt_display_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 = qt_display_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 = qt_display_height() - (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 = qt_display_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 = qt_display_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 = qt_display_height() - (swp.y + swp.cy); 2331 2349 QTLWExtra *top = d_func()->topData(); 2332 2350 swp.x += top->frameStrut.left();
Note:
See TracChangeset
for help on using the changeset viewer.