Do not recreate window if it is moved to a virtual sibling screen.

Task-number: QTBUG-32681
Task-number: QTBUG-33062
Change-Id: Id37627231b7a129c398d90d3f01ded6bd5171088
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Friedemann Kleint 2013-08-22 11:40:58 +02:00 committed by The Qt Project
parent 61edb80378
commit f738a4a5d5

View File

@ -348,8 +348,9 @@ void QWindowPrivate::updateVisibility()
void QWindowPrivate::setScreen(QScreen *newScreen, bool recreate)
{
Q_Q(QWindow);
if (newScreen != q->screen()) {
const bool shouldRecreate = recreate && platformWindow != 0;
if (newScreen != screen) {
const bool shouldRecreate = recreate && platformWindow != 0
&& !(screen && screen->virtualSiblings().contains(newScreen));
if (shouldRecreate)
q->destroy();
if (screen)