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/painting/qwindowsurface_pm.cpp

    r1033 r1034  
    608608        bmh.cy = d->image->height();
    609609
     610#ifdef QT_PM_NATIVEWIDGETMASK
    610611        int wh = widget->height();
    611612
     
    623624            GpiSetClipRegion(wps, wrgn, &oldRgn);
    624625            wrgn = oldRgn;
    625 
     626#endif
    626627            // Note: target is inclusive-inclusive, source is inclusive-exclusive
    627628            POINTL ptls[] = { { wbr.left(), wbr.top() },
     
    631632            GpiDrawBits(wps, (PVOID) const_cast<const QImage *>(d->image)->bits(),
    632633                        (PBITMAPINFO2) &bmh, 4, ptls, ROP_SRCCOPY, BBO_IGNORE);
     634
     635#ifdef QT_PM_NATIVEWIDGETMASK
    633636        }
    634637
    635638        if (wrgn != NULLHANDLE)
    636639            GpiDestroyRegion(wps, wrgn);
     640#endif
    637641
    638642        widget->releasePS(wps);
     
    696700        HWND hwndWidget = widget->internalWinId();
    697701        ULONG rc = WinQueryVisibleRegion(hwndWidget, hrgn);
     702#ifdef QT_PM_NATIVEWIDGETMASK
    698703        if (rc != RGN_ERROR) {
    699704            // substract children from the visible region, if any
    700705            rc = qt_WinProcessWindowObstacles(hwndWidget, NULL, hrgn,
    701706                                              CRGN_DIFF, PWO_Children);
     707#endif
    702708            if (rc != RGN_ERROR && hwnd != hwndWidget) {
    703709                // translate coords to the main widget's coordinate space
     
    708714                GpiOffsetRegion(hps, hrgn, &ptlOffset);
    709715            }
    710         }
     716#ifdef QT_PM_NATIVEWIDGETMASK
     717        }
     718#endif
    711719
    712720        if (rc == RGN_RECT || rc == RGN_COMPLEX) {
Note: See TracChangeset for help on using the changeset viewer.