summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qoffscreensurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qoffscreensurface.cpp')
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp
index e2306050dd..ce913a98af 100644
--- a/src/gui/kernel/qoffscreensurface.cpp
+++ b/src/gui/kernel/qoffscreensurface.cpp
@@ -160,6 +160,8 @@ void QOffscreenSurface::create()
d->platformOffscreenSurface = QGuiApplicationPrivate::platformIntegration()->createPlatformOffscreenSurface(this);
// No platform offscreen surface, fallback to an invisible window
if (!d->platformOffscreenSurface) {
+ if (QThread::currentThread() != qGuiApp->thread())
+ qWarning("Attempting to create QWindow-based QOffscreenSurface outside the gui thread. Expect failures.");
d->offscreenWindow = new QWindow(d->screen);
d->offscreenWindow->setSurfaceType(QWindow::OpenGLSurface);
d->offscreenWindow->setFormat(d->requestedFormat);