From f738a4a5d5f62c1136b5820a89c9b47080d150a4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 22 Aug 2013 11:40:58 +0200 Subject: [PATCH] Do not recreate window if it is moved to a virtual sibling screen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-32681 Task-number: QTBUG-33062 Change-Id: Id37627231b7a129c398d90d3f01ded6bd5171088 Reviewed-by: Jan Arve Sæther Reviewed-by: Shawn Rutledge --- src/gui/kernel/qwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 9ef19715ed..490cf0c110 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -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)