Changeset 775 for trunk/src/gui/kernel/qwidget_pm.cpp
- Timestamp:
- Aug 4, 2010, 1:28:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qwidget_pm.cpp
r749 r775 1389 1389 qApp->d_func()->closePopup(this); 1390 1390 if (destroyWindow && !(windowType() == Qt::Desktop) && 1391 internalWinId() != NULLHANDLE) { 1392 HWND id = internalWinId(); 1393 if (isWindow() && !(windowType() == Qt::Popup)) { 1394 // extra data including extra->topextra has been already 1395 // deleted at this point by deleteExtra() and therefore 1396 // calling frameWinId() is useless -- it will return the 1397 // client window handle. Use WinQueryWindow() instead. 1398 id = WinQueryWindow(id, QW_PARENT); 1399 Q_ASSERT(id != NULLHANDLE); 1400 } 1391 d->frameWinId() != NULLHANDLE) { 1392 // make sure the backing store is deleted before destroying HWND -- 1393 // QPMDiveWindowSurface depends on that 1394 delete d->topData()->backingStore; 1395 d->topData()->backingStore = 0; 1396 // now destroy HWND 1397 HWND id = d->frameWinId(); 1401 1398 #if defined(QT_DEBUGWINCREATEDESTROY) 1402 1399 qDebug() << "|Destroying window" << this … … 1472 1469 } 1473 1470 1474 if ((q->windowType() == Qt::Desktop)) 1475 old_fid = NULLHANDLE; 1471 if (old_fid != NULLHANDLE && q->windowType() != Qt::Desktop) { 1472 // make sure the backing store is deleted before destroying HWND -- 1473 // QPMDiveWindowSurface depends on that 1474 if (extra && extra->topextra) { 1475 delete extra->topextra->backingStore; 1476 extra->topextra->backingStore = 0; 1477 // zero the to-be-destroyed frame HWND just in case 1478 extra->topextra->fId = NULLHANDLE; 1479 } 1480 // now destroy HWND 1481 qt_WinDestroyWindow(old_fid); 1482 } 1483 1476 1484 setWinId(0); 1477 1485 … … 1506 1514 setWindowTitle_helper(extra->topextra->caption); 1507 1515 } 1508 if (old_fid != NULLHANDLE)1509 qt_WinDestroyWindow(old_fid);1510 1516 1511 1517 if (q->testAttribute(Qt::WA_AcceptDrops) || dropSiteWasRegistered
Note:
See TracChangeset
for help on using the changeset viewer.