Destroy the QWindow children in destroy() instead of close()
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Mon, 6 Feb 2012 14:58:15 +0000 (16:58 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 6 Feb 2012 15:48:22 +0000 (16:48 +0100)
commit16c4224568b7969591120f163dc81ba61cd1e6f8
tree0b06333bd50689f545e061755fb8c97eaf9d72c0
parent5d255789cdd6f1d301c161e25151595ca06db436
Destroy the QWindow children in destroy() instead of close()

When closing a window, destroy() ensures a setVisible(false) call only
for the window itself, not for other windows parented to it. With the
new quit lock ref feature this breaks code that creates a fake root
window parented to the main, visible window. (for example the
xcomposite backends of qtwayland do this)

Such apps do not anymore exit after closing their window because the
children do not receive a deref due to setVisible not getting called.
(At that point. It would get called after exiting the event loop but
that never happens due to the refcounting)

Change-Id: I124737c80ad59600ddc79261100f3904af0f410d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/kernel/qwindow.cpp