Use the following demo to test based on Wine: demo: [demo-1.cpp](/uploads/574fcefc61ce0438aca28d9d0c35cfd6/demo-1.cpp) The initial **Z-order** state of **WindowA**, **WindowB**, and **WindowC** is as follows: {width=900 height=427} Next, click the button **\[Place WindowA above WindowB\]**, **WindowA** is placed above **WindowB**: {width=900 height=427} Next, click the button **\[Place WindowB above WindowA\]**, **WindowB** is placed above **WindowA**: {width=900 height=420} -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9999#note_128753