Ignore:
Timestamp:
Aug 29, 2011, 1:43:52 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

OS/2: Disable native window masking code as it is not complete.

This code is only necessary for child widgets that have native windows.
Applications using this approach are very rare (they include e.g. video
players that paint to Qt widgets on their own using native window IDs)
and they don't need masking in these widgets or their ancestors anyway.

The current implementation lacks some functionality -- in particular, it
cannot properly issue WM_VRNENABLED/WM_VRNDISABLED notifications
which breaks those video players, so that keeping it enabled makes little
to no sense.

The relevant code remains in place but guarded by the
QT_PM_NATIVEWIDGETMASK compiler macro so that it can be enabled
as needed for further experiments. See also #203 for more details.

File:
1 edited

Legend:

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

    r1009 r1034  
    123123extern QCursor *qt_grab_cursor();
    124124
     125#ifdef QT_PM_NATIVEWIDGETMASK
    125126extern void qt_WinQueryClipRegionOrRect(HWND hwnd, HRGN hrgn); // qwidget_pm.cpp
     127#endif
    126128
    127129extern bool qt_sendSpontaneousEvent(QObject*, QEvent*); // qapplication.cpp
     
    11911193                        }
    11921194                        if (!dispatch) {
     1195#ifdef QT_PM_NATIVEWIDGETMASK
    11931196                            HPS hps = qt_display_ps();
    11941197                            HRGN hrgn = GpiCreateRegion(hps, 0, NULL);
     
    11991202                            dispatch = !GpiPtInRegion(hps, hrgn, &pt);
    12001203                            GpiDestroyRegion(hps, hrgn);
     1204#else
     1205                            QPoint lcpos = widget->mapFromGlobal(cpos);
     1206                            QRect rect(0, 0, widget->width(), widget->height());
     1207                            dispatch = !rect.contains(lcpos);
     1208#endif
    12011209                        }
    12021210                    }
     
    23262334    HPS displayPS = qt_display_ps();
    23272335
     2336#ifdef QT_PM_NATIVEWIDGETMASK
    23282337    // Since we don't use WS_CLIPSIBLINGS and WS_CLIPCHILDREN bits (see
    23292338    // qwidget_pm.cpp), we have to validate areas that intersect with our
    23302339    // children and siblings, taking their clip regions into account.
    23312340    d_func()->validateObstacles();
     2341#endif
    23322342
    23332343    Q_ASSERT(testAttribute(Qt::WA_WState_Created));
Note: See TracChangeset for help on using the changeset viewer.