summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp')
-rw-r--r--src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp b/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
index bec0b60..087fb1c 100644
--- a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
+++ b/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
@@ -89,13 +89,26 @@ void QTestLiteWindowSurface::flush(QWidget *widget, const QRegion &region, const
xw->paintEvent();
}
-void QTestLiteWindowSurface::setGeometry(const QRect &rect)
+
+void QTestLiteWindowSurface::geometryChanged(const QRect &rect)
{
- //qDebug() << "QTestLiteWindowSurface::setGeometry:" << rect << xw->window;
QWindowSurface::setGeometry(rect);
- if (xw->img.size() != rect.size())
+ if (xw->img.size() != rect.size()) {
xw->img = QImage(rect.size(), mScreen->format());
+ window()->update(); //### this is the wrong place for this...
+ }
+
+}
+
+
+void QTestLiteWindowSurface::setGeometry(const QRect &rect)
+{
+ QRect oldRect = geometry();
+ if (rect == oldRect)
+ return;
+
+ QTestLiteWindowSurface::geometryChanged(rect);
//if unchanged ###
// xw->setSize(rect.width(), rect.height());
@@ -212,6 +225,7 @@ void QTestLiteWindowSurface::handleMouseEvent(QEvent::Type type, void *ev)
void QTestLiteWindowSurface::handleGeometryChange(int x, int y, int w, int h)
{
+ geometryChanged(QRect(x,y,w,h));
QApplicationPrivate::handleGeometryChange(window(), QRect(x,y,w,h));
}