Fix layer being destroyed when still in-flight


If the window is pulled out under us we still need to delay when the
layer is destroyed, so that any ongoing usage in the engine has time to
finish up.

This amends 35583ef9832afcbb3d97872eb5101f1f54025b3a

Fixes: QTBUG-142663
Pick-to: 6.11 6.10 6.8
Change-Id: I2a9ea66569994001e29aae94f791d23959b89f80
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
commit2394be04002ed1f3da34272669241d39d4b2602b
parent3af7e3b32897e385a4293b65706d668b992bd806
authorChristian Strømme <christian.stromme@qt.io>
committerChristian Strømme <christian.stromme@qt.io>
commit timeWed, 28 Jan 2026 13:20:42 +0100