Ignore:
Timestamp:
Aug 20, 2011, 1:59:50 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

OS/2: Create native widget siblings and children when native ID is requested.

This makes sure each sibling and child of the widget for which a native
window is created will get a native window too. This is necessary to let
the system do proper clipping when the widget is painted on externally
using its native window ID.

Note that on OS/2 system clipping is not done (see QWidget::create_sys())
so qt_WinProcessWindowObstacles() needs to be used to clip out areas
obscured by other widgets when directly painting on the widget bypassing
Qt.

File:
1 edited

Legend:

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

    r846 r1012  
    798798    one of the more specialized handlers above.
    799799
    800     Events and the mechanism used to deliver them are covered in 
     800    Events and the mechanism used to deliver them are covered in
    801801    \l{The Event System}.
    802802
     
    1006310063    bool newParent = (parent != parentWidget()) || !wasCreated || desktopWidget;
    1006410064
    10065 #if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
     10065#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
    1006610066    if (newParent && parent && !desktopWidget) {
    1006710067        if (testAttribute(Qt::WA_NativeWindow) && !qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings))
     
    1072310723            }
    1072410724        }
     10725#endif //QT_NO_IM
    1072510726        if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget())
    1072610727            parentWidget()->d_func()->enforceNativeChildren();
    1072710728        if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created))
    1072810729            d->createWinId();
     10730#ifndef QT_NO_IM
    1072910731        if (ic && isEnabled() && focusWidget->isEnabled()
    1073010732            && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
     
    1073610738    case Qt::WA_PaintOnScreen:
    1073710739        d->updateIsOpaque();
    10738 #if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
     10740#if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
    1073910741        // Recreate the widget if it's already created as an alien widget and
    1074010742        // WA_PaintOnScreen is enabled. Paint on screen widgets must have win id.
Note: See TracChangeset for help on using the changeset viewer.