Changeset 743 for trunk/src


Ignore:
Timestamp:
May 31, 2010, 4:52:33 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Fixed: Qt Assistant would corrupt screen at startup in DIVE FB mode (fixes ticket:160) [based on patch by rudi].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/painting/qwindowsurface_pm.cpp

    r742 r743  
    336336    bool vrnDisabled;
    337337    bool inDrag;
     338    int windowHeight;
    338339    SETUP_BLITTER setup;
    339340    QVector<RECTL> rcls;
     
    358359    d->vrnDisabled = false;
    359360    d->inDrag = false;
     361    d->windowHeight = 0;
    360362
    361363    memset(&d->setup, 0, sizeof(SETUP_BLITTER));
     
    513515        GpiDestroyRegion(hps, hrgn);
    514516        window()->releasePS(hps);
     517
     518        // memorize the window height used for the additional visible region
     519        // validation in doFlush()
     520        d->windowHeight = window()->height();
    515521
    516522#if defined(QDIVE_DEBUG)
     
    639645        if (!d->useFB) {
    640646            // associate the image data pointer with the buffer number
    641             DiveFreeImageBuffer(d->hDive, d->bufNum);
     647            if (d->bufNum)
     648                DiveFreeImageBuffer(d->hDive, d->bufNum);
    642649            d->bufNum = 0;
    643650            ULONG rc = DiveAllocImageBuffer(d->hDive, &d->bufNum,
     
    928935    QPoint dstDelta = from.topLeft() - to;
    929936
     937    const int windowHeight = window()->height();
     938
     939    // sometimes PM does not send WM_VRNENABLED although the window size has
     940    // been changed (this is known to happen in FB mode with the Qt Assistant
     941    // application) which leads to screen corruption due to outdated visible
     942    // regions. A fix is to memorize the window height and check it here
     943    if (windowHeight != d->windowHeight)
     944        d->vrnDirty = true;
     945
    930946    bool wasPosDirty = d->posDirty;
    931947    bool wasVrnDirty = d->vrnDirty;
    932948
    933949    adjustSetup();
    934 
    935     const int windowHeight = window()->height();
    936950
    937951    if (wasVrnDirty) {
Note: See TracChangeset for help on using the changeset viewer.