diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-08-17 20:21:38 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-08-17 20:24:12 (GMT) |
commit | bc6c569b0d5862a159394de831cd129b610715ad (patch) | |
tree | 6d736fa3767c125624a57aeed05bcce191739715 /src/plugins | |
parent | 5f2c869e787160f94bd08faf8b625458e2ceb3a7 (diff) | |
download | Qt-bc6c569b0d5862a159394de831cd129b610715ad.zip Qt-bc6c569b0d5862a159394de831cd129b610715ad.tar.gz Qt-bc6c569b0d5862a159394de831cd129b610715ad.tar.bz2 |
Fix a bug in wrt DFBWindowSurface's paintEngine
Make sure we recreate the paint engine if it's 0 in beginPaint. Also
don't delete the paint engine in moves, only resizes.
Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 17 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h | 1 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index d837509..57894d5 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -55,7 +55,6 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect #ifndef QT_NO_DIRECTFB_WM , dfbWindow(0) #endif - , engineHeight(-1) , flipFlags(flip) , boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip) { @@ -76,7 +75,6 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect #ifndef QT_NO_DIRECTFB_WM , dfbWindow(0) #endif - , engineHeight(-1) , flipFlags(flip) , boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip) { @@ -223,13 +221,14 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) break; } } + if (size() != geometry().size()) { + delete engine; + engine = 0; + } + if (result != DFB_OK) DirectFBErrorFatal("QDirectFBWindowSurface::setGeometry()", result); } - if (engine) { - delete engine; - engine = 0; - } QWSWindowSurface::setGeometry(rect); } @@ -419,12 +418,8 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, void QDirectFBWindowSurface::beginPaint(const QRegion &) { - const int h = height(); - if (h > engineHeight) { - engineHeight = h; - delete engine; + if (!engine) engine = new QDirectFBPaintEngine(this); - } } void QDirectFBWindowSurface::endPaint(const QRegion &) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h index 0d6ebc0..396cc32 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h @@ -91,7 +91,6 @@ private: void createWindow(); IDirectFBWindow *dfbWindow; #endif - int engineHeight; enum Mode { Primary, |