Alexandre Julliard pushed to branch master at wine / wine
Commits: 0dc7e404 by Rémi Bernon at 2024-11-15T19:08:20+01:00 winex11: Ignore focus changes during WM_STATE transitions.
When WM_STATE is being quickly updated, and depending on the WM we might receive transient focus changes, which will disrupt the Win32 state and make us randomly lose focus.
Ignore them instead, when a window is being shown, and wait for WM_STATE to be updated and stable. We will eventually receive a WM_TAKE_FOCUS / FocusIn event *after* a window has been shown.
When a window is hidden or minimized, we will receive the FocusOut event during the WM_STATE transition, and can safely handle it in this case, as we should have done all the Win32 side effects and have changed the foreground window already.
When there's no window state change pending, the focus change event is unexpected, coming from the user or WM, and we handle it normally.
- - - - -
3 changed files:
- dlls/winex11.drv/event.c - dlls/winex11.drv/window.c - dlls/winex11.drv/x11drv.h
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/0dc7e4046836595335cd64c92cc1327...