QWidget: Set screen on top-level windows only.
Change-Id: Iea7fbe253ff3144d9988fd14790296e211075d3b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
0412ad3513
commit
cb7dd74bb5
@ -1422,7 +1422,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
||||
win->setGeometry(q->geometry());
|
||||
else
|
||||
win->resize(q->size());
|
||||
win->setScreen(QGuiApplication::screens().value(topData()->screenIndex, 0));
|
||||
if (win->isTopLevel())
|
||||
win->setScreen(QGuiApplication::screens().value(topData()->screenIndex, 0));
|
||||
|
||||
QSurfaceFormat format = win->requestedFormat();
|
||||
if ((flags & Qt::Window) && win->surfaceType() != QSurface::OpenGLSurface
|
||||
|
Loading…
Reference in New Issue
Block a user