Changeset 63


Ignore:
Timestamp:
Feb 25, 2006, 9:58:01 PM (19 years ago)
Author:
dmik
Message:

Fixed QWidget::erase() broken by changeset:61.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/qwidget.h

    r61 r63  
    599599    friend class QDragManager;
    600600#elif defined (Q_WS_PM)
    601     enum ClipMode { Unclipped, ClipAll, ClipSiblings };
    602     HPS getTargetPS( ClipMode m = ClipAll );   
     601    enum ClipMode { ClipDefault, Unclipped, ClipAll, ClipSiblings };
     602    HPS getTargetPS( ClipMode m = ClipDefault );   
    603603    friend Q_EXPORT void bitBlt( QPaintDevice *, int, int,
    604604                                 const QPaintDevice *,
  • trunk/src/kernel/qpainter_pm.cpp

    r62 r63  
    539539        } else {
    540540            hps = w->getTargetPS ( unclipped ? QWidget::Unclipped :
    541                                                QWidget::ClipAll );
     541                                               QWidget::ClipDefault );
    542542            w->hps = hps;
    543543        }
     
    931931//      }
    932932#endif
     933        // clip region in GPI cannot be used for anything else, so detach it
     934        cur_crgn.detach();
    933935    } else {
    934936        cur_crgn = def_crgn;
    935937    }
    936938
    937     // clip region in GPI cannot be used for anything else, so detach it
    938     cur_crgn.detach();
    939    
    940939    if ( !cur_crgn.isNull() )
    941940        GpiSetClipRegion( hps, cur_crgn.handle( devh ), NULL );
  • trunk/src/kernel/qwidget_pm.cpp

    r61 r63  
    994994#if defined (DEBUG_REPAINTRESIZE)
    995995        qDebug( "repaint(): [%s/%s/%08X] <region> erase: %d resizeNoErase: %d",
    996                 name(), className(), widget_flags,
     996                name(), className(), widget_flags, erase,
    997997                (testWFlags( WResizeNoErase ) != 0) );
    998998#endif
     
    14051405    } else if ( !hps ) {
    14061406        tmphps = TRUE;
    1407         lhps = getTargetPS();
     1407        lhps = getTargetPS( ClipAll );
    14081408    } else {
    14091409        tmphps = FALSE;
     
    14401440    } else if ( !hps ) {
    14411441        tmphps = TRUE;
    1442         lhps = getTargetPS();
     1442        lhps = getTargetPS( ClipAll );
    14431443    } else {
    14441444        tmphps = FALSE;
     
    18721872 *  The returned handle must be freed using WinReleasePS() after usage.
    18731873 */
    1874 HPS QWidget::getTargetPS( ClipMode m /* = ClipAll */ )
     1874HPS QWidget::getTargetPS( ClipMode m /* = ClipDefault */ )
    18751875{
    18761876    HPS widgetPS = 0;
     
    18791879        widgetPS = WinGetScreenPS( HWND_DESKTOP );
    18801880    } else {
    1881         if ( m == Unclipped || testWFlags( WPaintUnclipped ) ) {
     1881        if ( m == Unclipped || (m == ClipDefault &&
     1882                                testWFlags( WPaintUnclipped )) ) {
    18821883            widgetPS = WinGetClipPS( winId(), 0, PSF_PARENTCLIP );
    18831884        } else {
Note: See TracChangeset for help on using the changeset viewer.