On Tue Feb 3 03:52:16 2026 +0000, Zhao Yi wrote:
Thank you for your review. The window Z-order logic in Wine works as follows: when **SetWindowPos** is called, a window Z-order linked list is constructed on the **wineserver** side. When retrieving a window at a specified Z-order position—such as calling the **GetTopWindow/GetNextWindow** functions to obtain the top window or the next window—it is fetched from the window Z-order linked list built on the **wineserver** side. Therefore, the correct window at the specified Z-order position can always be retrieved. In the demo results running on Wine mentioned above, calling **GetNextWindow(hwnd, GW_HWNDNEXT)** to get the next window after window A returns window B, which aligns with the expected outcome: {width=900 height=447} After applying this MR !9999, running the above demo on Wine and clicking the "Place WindowA above WindowB" button results in WindowA being placed above WindowB, which matches the behavior observed when running the same demo on Windows: {width=877 height=447}
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9999#note_128608