9138c1c7
by Zhiyi Zhang at 2026-05-22T20:58:55+02:00
winex11.drv: Return WithdrawnState when get_window_wm_state() fails.
KWin deletes WM_STATE property from a window when entering WithdrawnState. Please see
X11Window::exportMappingState() in the KWin source code. So when get_window_wm_state()
fails, -1 is returned before this patch. Since -1 is not a valid WM_STATE, it might cause
Wine to expect an invalid value. We also can't simply ignore the invalid -1 because we
might be expecting the WM_STATE property notify event to change to the desired state.
Treating missing WM_STATE property as WithdrawnState seems like the best way to go.
Help fix RiME(493200) sometimes fails to restore from Alt+Tab.