http://bugs.winehq.org/show_bug.cgi?id=9320
--- Comment #17 from Vincent Povirk madewokherd@gmail.com 2009-11-11 14:09:36 --- I think I get it. Explorer can SetForegroundWindow() another process's window, but GetFocus() will only return a window in the current thread. So it ends up focusing the desktop.
However, if we want the virtual desktop focus to have its own focus, independent from the rest of X, we don't want to change the foreground window when the virtual desktop is focused. We just want to find the right hwnd and give it the X focus.
But which hwnd should be focused? Is it GetForegroundWindow() ? Is that the same as the window that gets keyboard input?
Or do I want GetGUIThreadInfo(NULL)->focus ?