user32/tests: Add test for SetFocus() (with few todo)(Try 2).

Alexandre Julliard julliard at
Mon Sep 17 04:29:46 CDT 2012

Sergey Guralnik <serhio at> 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

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.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list