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_raster.cpp

    r846 r1034  
    248248    int ih = img.height();
    249249
     250#ifdef QT_PM_NATIVEWIDGETMASK
    250251    // produce a clip region that excludes all descending obstacles
    251252    // (like child widgets with real HWNDs which are not excluded by Qt)
     
    261262        GpiSetClipRegion(wps, wrgn, &oldRgn);
    262263        wrgn = oldRgn;
    263 
     264#endif
    264265        // Note: target is inclusive-inclusive, source is inclusive-exclusive
    265266        POINTL ptls[] = { { wbr.left(), wh - wbr.bottom() - 1 },
     
    275276        GpiDrawBits(wps, (PVOID) img.bits(), (PBITMAPINFO2) &bmh, 4, ptls,
    276277                    ROP_SRCCOPY, BBO_IGNORE);
     278
     279#ifdef QT_PM_NATIVEWIDGETMASK
    277280    }
    278281
    279282    if (wrgn != NULLHANDLE)
    280283        GpiDestroyRegion(wps, wrgn);
     284#endif
    281285
    282286#elif QT_BITMAP_MIRROR == 2
     
    306310    bmh.cy = d->image->height();
    307311
     312#ifdef QT_PM_NATIVEWIDGETMASK
    308313    int wh = widget->height();
    309314
     
    321326        GpiSetClipRegion(wps, wrgn, &oldRgn);
    322327        wrgn = oldRgn;
    323 
     328#endif
    324329        // Note: target is inclusive-inclusive, source is inclusive-exclusive
    325330        POINTL ptls[] = { { wbr.left(), wbr.top() },
     
    343348
    344349        GpiEnableYInversion(wps, oldInversion);
     350
     351#ifdef QT_PM_NATIVEWIDGETMASK
    345352    }
    346353
    347354    if (wrgn != NULLHANDLE)
    348355        GpiDestroyRegion(wps, wrgn);
     356#endif
    349357
    350358#ifndef QT_NO_DEBUG
     
    391399    bmh.cy = d->image->height();
    392400
     401#ifdef QT_PM_NATIVEWIDGETMASK
    393402    int wh = widget->height();
    394403
     
    406415        GpiSetClipRegion(wps, wrgn, &oldRgn);
    407416        wrgn = oldRgn;
    408 
     417#endif
    409418        // Note: target is inclusive-inclusive, source is inclusive-exclusive
    410419        POINTL ptls[] = { { wbr.left(), wbr.top() },
     
    414423        GpiDrawBits(wps, (PVOID) const_cast<const QImage &>(d->image->image).bits(),
    415424                    (PBITMAPINFO2) &bmh, 4, ptls, ROP_SRCCOPY, BBO_IGNORE);
     425
     426#ifdef QT_PM_NATIVEWIDGETMASK
    416427    }
    417428
    418429    if (wrgn != NULLHANDLE)
    419430        GpiDestroyRegion(wps, wrgn);
     431#endif
    420432
    421433#ifndef QT_NO_DEBUG
Note: See TracChangeset for help on using the changeset viewer.