Changeset 307 for trunk/src


Ignore:
Timestamp:
Nov 10, 2009, 12:00:52 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Fixed incorrect Qt dirty widget region calculation when processing WM_PAINT messages. This fixes a lot of redraw problems (#80, #91 and more).

Location:
trunk/src/gui
Files:
2 edited

Legend:

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

    r301 r307  
    693693                mw = mw->parentWidget()->window();
    694694            if (mw->testAttribute(Qt::WA_WState_Created) && mw != QApplicationPrivate::active_window)
    695                 WinSetWindowPos(mw->d_func()->frameWinId(), HWND_TOP, 0, 0, 0, 0, SWP_ZORDER );
     695                WinSetWindowPos(mw->d_func()->frameWinId(), HWND_TOP, 0, 0, 0, 0, SWP_ZORDER);
    696696        }
    697697    } else {
     
    19831983    setAttribute(Qt::WA_PendingUpdate, false);
    19841984
    1985     // @todo not sure we need it
    19861985    const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
    19871986    // Make sure the invalidated region contains the region we're about to repaint.
     
    19891988    // to enlarge it afterwards (only shrink it).
    19901989    if (!dirtyInBackingStore.isEmpty())
    1991       WinInvalidateRegion(internalWinId(), dirtyInBackingStore.handle(), FALSE);
     1990      WinInvalidateRegion(internalWinId(), dirtyInBackingStore.handle(height()), FALSE);
    19921991
    19931992    RECTL rcl;
  • trunk/src/gui/painting/qregion.h

    r113 r307  
    145145    inline HRGN    handle() const { ensureHandle(); return d->rgn; }
    146146#elif defined(Q_WS_PM)
    147     inline HRGN handle(int targetHeight = 0) const {
     147    inline HRGN handle(int targetHeight) const {
    148148        if (d->rgn == NULLHANDLE || d->height != targetHeight)
    149149            updateHandle(targetHeight);
Note: See TracChangeset for help on using the changeset viewer.