Changeset 1016 for trunk/src


Ignore:
Timestamp:
Aug 20, 2011, 10:07:07 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

OS/2: Don't destroy widget's HWND on reparent until children are reparented.

Destroying the window handle destroys all child windows so it is necessary to
associate them with a new parent handle before the old one is destroyed.

This fixes a problem of disappeared child widgets which had native IDs after
reparenting in e.g. QT_USE_NATIVE_WINDOWS=1 mode (when all widgets
have native IDs).
native IDs also in normwhen groups of windows
with native

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qwidget_pm.cpp

    r1013 r1016  
    15121512    }
    15131513
    1514     if (old_fid != NULLHANDLE && q->windowType() != Qt::Desktop) {
    1515         // destroy HWND
    1516 #if defined(QT_DEBUGWINCREATEDESTROY)
    1517             qDebug() << "|Destroying window" << q
    1518                      << "\n|  hwnd"  << qDebugFmtHex(old_fid);
    1519             if (old_fid != data.winid)
    1520                 qDebug() << "|  hwnd" << qDebugFmtHex(data.winid) << "(client)";
    1521 #endif
    1522         qt_WinDestroyWindow(old_fid);
    1523     }
    1524 
    1525     QTLWExtra *top = maybeTopData();
    1526     if (top)
    1527         top->fId = 0;
     1514    if ((q->windowType() == Qt::Desktop))
     1515        old_fid = 0;
     1516
     1517    if (extra && extra->topextra)
     1518        extra->topextra->fId = 0;
    15281519    setWinId(0);
    15291520
     
    15571548        setWindowIcon_sys(true);
    15581549        setWindowTitle_helper(extra->topextra->caption);
     1550
     1551
     1552
     1553
     1554
     1555
     1556
     1557
     1558
     1559
    15591560    }
    15601561
Note: See TracChangeset for help on using the changeset viewer.