ICCCM 4.1.4 says:
Clients that want to re-use a client window (e.g. by mapping it again) after
withdrawing it must wait for the withdrawal to be complete before proceeding.
The preferred method for doing this is for clients to wait for a windown manager
to update or remove the WM_STATE property.
This patch implements the required logic. Qt 4 had something similar. Without
this patch we are calling various setter functions on a native window while it
is in an undefined state.
Fixes: QTBUG-69515
Pick-to: 6.2 5.15
Done-with: Liang Qi <liang.qi@qt.io>
Change-Id: I377a66ad3d5e43f14465d0ea670b2f43f96ed7d3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>