Changeset 1019 for trunk/src/gui/kernel/qwidget_pm.cpp
- Timestamp:
- Aug 22, 2011, 4:35:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qwidget_pm.cpp
r1016 r1019 513 513 #if defined(QT_DEBUGWIDGETMASK) 514 514 qDebug() << "qt_WinSetWindowPos: hwnd" << qDebugHWND(hwnd) 515 516 515 517 << "fl" << qDebugFmtHex(fl); 516 518 #endif … … 530 532 SWP swpOld; 531 533 WinQueryWindowPos(hwnd, &swpOld); 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 532 550 533 551 // do some checks … … 1554 1572 qDebug() << "|Destroying window (reparent)" << q 1555 1573 << "\n| hwnd" << qDebugFmtHex(old_fid); 1556 if (old_fid != data.winid)1557 qDebug() << "| hwnd" << qDebugFmtHex(data.winid) << "(client)";1558 1574 #endif 1559 1575 qt_WinDestroyWindow(old_fid); … … 2071 2087 if (q->internalWinId() != NULLHANDLE) { 2072 2088 Q_ASSERT(parent->internalWinId() != NULLHANDLE); 2073 int h = parent->height(); 2089 // important: use real parent height (it may not match crect yet) 2090 RECTL rcl; 2091 WinQueryWindowRect(parent->internalWinId(), &rcl); 2074 2092 qt_WinSetWindowPos(q->internalWinId(), 0, xrect.x(), 2075 2093 // flip y coordinate 2076 h- (xrect.y() + xrect.height()),2094 - (xrect.y() + xrect.height()), 2077 2095 xrect.width(), xrect.height(), 2078 2096 SWP_MOVE | SWP_SIZE); … … 2128 2146 // than moving mapped windows 2129 2147 if (q->internalWinId() != NULLHANDLE) { 2130 int h = parent->height(); 2131 if (parent->internalWinId() == NULLHANDLE) { 2132 xrect.translate(parent->mapTo(q->nativeParentWidget(), QPoint(0, 0))); 2133 h = q->nativeParentWidget()->height(); 2134 } 2148 Q_ASSERT(parent->effectiveWinId()); 2149 // important: use real parent height (it may not match crect yet) 2150 RECTL rcl; 2151 WinQueryWindowRect(parent->effectiveWinId(), &rcl); 2135 2152 qt_WinSetWindowPos(q->internalWinId(), 0, xrect.x(), 2136 2153 // flip y coordinate 2137 h- (xrect.y() + xrect.height()),2154 - (xrect.y() + xrect.height()), 2138 2155 xrect.width(), xrect.height(), SWP_MOVE | SWP_SIZE); 2139 2156 }
Note:
See TracChangeset
for help on using the changeset viewer.