aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/qsgrenderloop_p.h1
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp21
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop_p.h2
-rw-r--r--src/quick/scenegraph/qsgwindowsrenderloop_p.h2
4 files changed, 24 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop_p.h b/src/quick/scenegraph/qsgrenderloop_p.h
index 7b06399f08..72bad16c63 100644
--- a/src/quick/scenegraph/qsgrenderloop_p.h
+++ b/src/quick/scenegraph/qsgrenderloop_p.h
@@ -61,6 +61,7 @@ public:
virtual void show(QQuickWindow *window) = 0;
virtual void hide(QQuickWindow *window) = 0;
+ virtual void resize(QQuickWindow *) {};
virtual void windowDestroyed(QQuickWindow *window) = 0;
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index 2de9827ab1..e50d034529 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -817,6 +817,7 @@ void QSGThreadedRenderLoop::show(QQuickWindow *window)
win.thread = new QSGRenderThread(this, QQuickWindowPrivate::get(window)->context);
win.timerId = 0;
win.updateDuringSync = false;
+ win.gotBrokenExposeFromPlatformPlugin = false;
m_windows << win;
}
@@ -882,6 +883,17 @@ void QSGThreadedRenderLoop::exposureChanged(QQuickWindow *window)
}
}
+void QSGThreadedRenderLoop::resize(QQuickWindow *window)
+{
+ Window *w = windowFor(m_windows, window);
+ if (w->gotBrokenExposeFromPlatformPlugin
+ && window->width() > 0 && window->height() > 0
+ && w->window->geometry().intersects(w->window->screen()->availableGeometry())) {
+ w->gotBrokenExposeFromPlatformPlugin = false;
+ handleExposure(w);
+ }
+}
+
/*!
Will post an event to the render thread that this window should
@@ -891,6 +903,15 @@ void QSGThreadedRenderLoop::handleExposure(Window *w)
{
QSG_GUI_DEBUG(w->window, "handleExposure");
+ if (w->window->width() <= 0 || w->window->height() <= 0
+ || !w->window->geometry().intersects(w->window->screen()->availableGeometry())) {
+#ifndef QT_NO_DEBUG
+ qWarning("QSGThreadedRenderLoop: expose event received for window with invalid geometry.");
+#endif
+ w->gotBrokenExposeFromPlatformPlugin = true;
+ return;
+ }
+
// Because we are going to bind a GL context to it, make sure it
// is created.
if (!w->window->handle())
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
index 5943d0bd08..844d180788 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h
+++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
@@ -60,6 +60,7 @@ public:
void show(QQuickWindow *window);
void hide(QQuickWindow *window);
+ void resize(QQuickWindow *window);
void windowDestroyed(QQuickWindow *window);
void exposureChanged(QQuickWindow *window);
@@ -89,6 +90,7 @@ private:
QSGRenderThread *thread;
int timerId;
uint updateDuringSync : 1;
+ uint gotBrokenExposeFromPlatformPlugin : 1;
};
friend class QSGRenderThread;
diff --git a/src/quick/scenegraph/qsgwindowsrenderloop_p.h b/src/quick/scenegraph/qsgwindowsrenderloop_p.h
index ff5529646b..e4ee688c9f 100644
--- a/src/quick/scenegraph/qsgwindowsrenderloop_p.h
+++ b/src/quick/scenegraph/qsgwindowsrenderloop_p.h
@@ -81,8 +81,6 @@ public:
void render();
void renderWindow(QQuickWindow *window);
- void resize(QQuickWindow *, const QSize &) { }
-
bool event(QEvent *event);
bool anyoneShowing() const;