Fix closing windows in qtshell example


Setting the QWaylandQuickItem's surface (QWaylandSurface) to null only
when the shell surface is alredy null ensures that
QWaylandQtShellChrome::clientDestroyed is fired again.
However, handling shellSurfaceChanged instead of clientDestroyed fixes
the issue, as well, with the additional benefit, that there are no null
accesses (of shellSurface) in the example's Chrome.qml.

Pick-to: 6.12 6.11
Fixes: QTBUG-147321
Change-Id: I2d3bbf7172c6a100a24c87824a761ecc973c11f7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
commit8aeda283c88263ad73475c7940f9829b7ea8308f
parent4312cfc837823a0bde320f5ec86c2d959005bafa
authorBernd Weimer <bernd.weimer@qt.io>
committerBernd Weimer <bernd.weimer@qt.io>
commit timeTue, 16 Jun 2026 07:00:49 +0000