Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/window.c:
saved_window_left = data->rects.window.left; saved_window_top = data->rects.window.top;
+ /* Detect restore from minimize: the window is at the offscreen sentinel + * position (-32000,-32000) and the compositor is sending a configure. + * Send SC_RESTORE to let Win32 handle the full restore sequence (clearing + * WS_MINIMIZE, restoring position/size, sending WM_SIZE, etc.). + * We must ack the configure before returning to avoid a protocol + * violation, then let SC_RESTORE trigger a new configure cycle. */ + restoring_from_minimize = saved_window_left <= -32000 && + saved_window_top <= -32000 && + (NtUserGetWindowLongW(hwnd, GWL_STYLE) & WS_MINIMIZE);
I don't know anymore how this works exactly but I feel that using the current Win32 state might introduce a race condition? Shouldn't we use the last requested config here, instead of the Win32 state that might already have changed since our last request? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10487#note_135946