Ignore:
Timestamp:
Jun 11, 2010, 4:45:27 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: OS/2: In Dive mode, the screen would get corrupted if the application created a child window with a real HWND (as e.g. smplayer does). Fixes #163.

File:
1 edited

Legend:

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

    r744 r745  
    403403    QRect br = rgn.boundingRect();
    404404
    405     QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft();
    406     QRect wbr = br.translated(-wOffset);
    407405    br.translate(offset);
    408406
     
    432430        br = br.intersected(QRect(0, 0, d->image->width(), d->image->height()));
    433431
     432        QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft();
     433        // note that we remove offset from wbr because the widget's HPS has a proper
     434        // origin already that includes this offset (which is in fact a position of
     435        // the widget relative to its top-level parent)
     436        QRect wbr = br.translated(-offset - wOffset);
     437
    434438        BITMAPINFOHEADER2 bmh;
    435439        memset(&bmh, 0, sizeof(BITMAPINFOHEADER2));
     
    452456        return;
    453457    }
     458
     459    QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft();
     460    // note that we leave offset in wbr since in DIVE mode the origin of the
     461    // blit target is always the top level window so we need to properly offset
     462    // the target position if we are flushing its child widget
     463    QRect wbr = br.translated(-wOffset);
    454464
    455465    if (d->vrnDisabled) {
Note: See TracChangeset for help on using the changeset viewer.