Restore the visibility of a moved QWindow in QWindow::screenDestroyed
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>
Thu, 29 Nov 2012 15:25:59 +0000 (16:25 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 30 Nov 2012 17:28:10 +0000 (18:28 +0100)
commit27a945dccd7dbe6449427f85c8ebdca7b0f654f8
tree51ab3658a4646280af50c9197d10b8751cd5ecac
parent6385a182f0f93820c96cf274e50a56492491ee10
Restore the visibility of a moved QWindow in QWindow::screenDestroyed

QWindow::screenDestroyed triggers an move of the window to the primary
screen. This causes the screen to be destroyed and shown again on the
new QScreen.

The issue is that QWindow::destroy() hides the window but create()
doesn't set it visible, and this ultimately causes any QWindow to be
automatically hidden when their QScreen is destroyed.

As stated in the comment, it could be the intended behavior that
windows aren't shown automatically on a remaining screen like when
using two screens not logically part of the same desktop. Once the
platform plugins have access to an API allowing them to adjust the
screens of their QWindow, this patch shouldn't be needed anymore.

Change-Id: I7628377c969f79f9eebb3deabaf0470542d68a9c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
src/gui/kernel/qwindow.cpp