Rémi Bernon (@rbernon) commented about dlls/wineandroid.drv/device.c:
{ struct ioctl_android_create_window req; struct native_win_wrapper *win = calloc( 1, sizeof(*win) ); + static HWND desktop_window_hwnd = (HWND) 0; + if (!desktop_window_hwnd) + desktop_window_hwnd = NtUserGetDesktopWindow(); Fwiw I'm not sure how well this works with virtual desktop, but the desktop window can change or you can have multiple desktop windows depending on the current thread associated desktop, so I don't think it should be cached.
Only one desktop is active at a time and windows from a different desktop should probably be hidden, although I don't think winex11 implements that correctly either (but still I think it can open multiple desktops). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9874#note_130694