Sergey Guralnik serhio@etersoft.ru writes:
That's mostly testing the window manager focus policy, I don't think that makes sense. What are you trying to demonstrate with this?
I try to show that some applications rely on finishing all side focus switching, which are result of call to some window management function, before this function returns. For example my app hopes that result of call to SetFocus() will not be distorted in message loop due call to DestroyWindow(), that made before call to SetFocus(). Is my explanation clear enough?
Not really. If you want to test purely the Wine behavior, then you shouldn't be waiting for window manager events. If the window manager is involved then you can't guarantee that a given window will always get focus.
If your app breaks because the window manager doesn't give it focus at a certain point, then pretty much the only solution is to change the wm policy, or use a different wm.