http://bugs.winehq.org/show_bug.cgi?id=34315
--- Comment #15 from Ken Thomases ken@codeweavers.com 2013-08-21 13:50:48 CDT --- (In reply to comment #12)
Wine does very little z-order manipulation and instead relies on hints to the window manager. Trying to enforce the exact z-order semantics of Windows hasn't worked well with window managers, which also expect to control the z-order.
The exception to this is that we raise a window when it becomes the topmost Wine window: http://source.winehq.org/source/dlls/winex11.drv/window.c#L1225
The above is specific to the X11 driver, not Wine generally. (Yes, this case is on Linux and so would be using the X11 driver.)
Also, just to be clear, your use of "topmost" is not the Win32 notion of "topmost". You just mean frontmost.
So it's not clear to me why HWND_NOTOPMOST would move your window behind anything, unless you're triggering a window manager behavior. Some window managers have protections against programs that spontaneously raise or steal focus.
I was wondering the same thing. I wonder if Wine re-asserts focus and the window manager raises the focused window. The original report says the problem doesn't happen if the window is focused before those SetWindowPos() calls.
Does the same thing happen in a virtual desktop?
Good question/suggestion.