https://bugs.winehq.org/show_bug.cgi?id=57650
--- Comment #3 from RĂ©mi Bernon rbernon@codeweavers.com --- From the log, after the key is pressed there is:
``` 0024:trace:event:call_event_handler 3252 KeyPress for hwnd/window 0x10076/5c00003
0024:trace:x11drv:X11DRV_WindowPosChanged win 0x10076/5c00003 new_rects { window (-32000,-32000)-(-31840,-31969), client (-32000,-32000)-(-32000,-32000), visible (-32000,-32000)-(-31840,-31969) } style 36010000 flags 00008134 0024:trace:x11drv:set_mwm_hints 0x10076 setting mwm hints to 0,3c (style 36010000 exstyle 50008) /* window minimization (WM_STATE == 3) is being requested here: */ 0024:trace:x11drv:window_set_wm_state window 0x10076/5c00003, requesting WM_STATE 0x1 -> 0x3 serial 3288, foreground 0x10076
0024:trace:x11drv:X11DRV_WindowPosChanged win 0x10076/5c00003 new_rects { window (-32000,-32000)-(-31840,-31969), client (-32000,-32000)-(-32000,-32000), visible (-32000,-32000)-(-31840,-31969) } style 26010000 flags 000018ab /* window unmapping request is being delayed, as a minimize is still pending: */ 0024:trace:x11drv:unmap_window win 0x10076/5c00003
0024:trace:x11drv:X11DRV_WindowPosChanged win 0x10076/5c00003 new_rects { window (-32000,-32000)-(-31840,-31969), client (-32000,-32000)-(-32000,-32000), visible (-32000,-32000)-(-31840,-31969) } style 26010000 flags 0000180b 0024:trace:event:call_event_handler 3283 PropertyNotify for hwnd/window 0x10076/5c00003 0024:trace:event:call_event_handler 3284 PropertyNotify for hwnd/window 0x10076/5c00003 0024:trace:event:call_event_handler 3285 PropertyNotify for hwnd/window 0x10076/5c00003 0024:trace:event:call_event_handler 3286 PropertyNotify for hwnd/window 0x10076/5c00003 0024:trace:event:call_event_handler 3287 PropertyNotify for hwnd/window 0x10076/5c00003 0024:trace:event:call_event_handler 3289 PropertyNotify for hwnd/window 0x10076/5c00003
/* the minimization reply is received, window didn't get minimized and we then discard the delayed unmap */ 0024:warn:x11drv:window_wm_state_notify window 0x10076/5c00003, mismatch WM_STATE 0x1/3289, expected 0x3/3288 ```
This looks like a WM bug, we request a minimization and the WM does not minimize the window but instead updates WM_STATE with NormalState. There is no way for us to know that this is not a user action, and we cannot ignore it or override it safely.
We could, perhaps, decide that if the window has an unmap pending we should prefer it over user actions, but I'm not sure it is a good idea to add such logic and it feels brittle.