16c5eccc
by Zhiyi Zhang at 2026-05-25T16:00:28+02:00
winex11.drv: Wait for the previous request when transitioning from IconicState to NormalState.
Fix a regression from 4c07e556. ea44fc34 is also related. Due to ea44fc34, when calling
window_set_wm_state(WithdrawnState), Wine doesn't wait for the previous WM_STATE update to be
completed. So when calling window_set_wm_state(WithdrawnState) and then window_set_wm_state(NormalState),
the queued NormalState can be overwritten by an unexpected IconicState property notify event from
a previous request, causing a window to be stuck in IconicState. For example,
```
40551.339:012c:fixme:x11drv:window_set_wm_state calling XIconifyWindow for hwnd 0x200ae.
...
40551.340:012c:warn:x11drv:window_set_wm_state window 0x200ae/aa00003 is iconic, remapping to workaround Mutter issues. data->current_state.wm_state 1 data->pending_state.wm_state 3.
40551.340:012c:trace:x11drv:window_set_wm_state window 0x200ae/aa00003, requesting WM_STATE 0x3 -> 0 serial 5227, foreground 0x10020, activate 0
...
40551.342:012c:warn:x11drv:handle_state_change window 0x200ae/aa00003 mismatch WM_STATE 0x3/5232, expected 0/5227
```
Fix RiME(493200) sometimes fails to restore from Alt+Tab.