Make QWindow backed QOffscreenSurfaces easier to identify

Change-Id: I2b4d9b752f4b356cb3b0019dcfd4aab2edc30e94
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
bb10
Tor Arne Vestbø 2016-08-19 17:32:30 +02:00 committed by Tor Arne Vestbø
parent acfc1cc362
commit 59ee2584e2
1 changed files with 1 additions and 0 deletions

View File

@ -177,6 +177,7 @@ void QOffscreenSurface::create()
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->setObjectName("QOffscreenSurface");
// Remove this window from the global list since we do not want it to be destroyed when closing the app.
// The QOffscreenSurface has to be usable even after exiting the event loop.
QGuiApplicationPrivate::window_list.removeOne(d->offscreenWindow);