[PATCH v2] user32: Always send WM_NCACTIVATE when changing the foreground window.

Alex Henrie alexhenrie24 at gmail.com
Thu Mar 16 21:51:18 CDT 2017


2017-03-10 13:36 GMT-07:00 Alexandre Julliard <julliard at winehq.org>:
> Alex Henrie <alexhenrie24 at gmail.com> writes:
>
>> 2017-03-10 2:02 GMT-07:00 Alexandre Julliard <julliard at winehq.org>:
>>> Alex Henrie <alexhenrie24 at gmail.com> writes:
>>>
>>>> Fixes https://bugs.winehq.org/show_bug.cgi?id=7198
>>>>
>>>> v2: Use the wineserver to determine if the new foreground window is
>>>> already active in its thread.
>>>
>>> It still looks suspicious to do it here, particularly since we already
>>> have code for this in set_active_window. It would need more tests to
>>> determine where it fits with the other messages of the sequence.
>>
>> Can you give me some details about the additional tests you want to
>> see, or assign the patch to someone who can help?
>
> There are already several message tests for SetActiveWindow, you'd want
> to do something similar for SetForegroundWindow, probably across two
> different threads to see the whole sequence.

Over the past few days I have been trying to develop more elaborate
SetForegroundWindow tests, but Windows appears to have a race
condition, and the results of the new tests are extremely unreliable.
When I execute the same code multiple times, sometimes I get a shorter
sequence, sometimes a longer sequence, and sometimes no sequence at
all.

I'm giving up on this; I'll attach the patch to the bug report for
anyone else who wants to try. For what it's worth, the simpler tests
that I included in the patch have always worked reliably.

-Alex



More information about the wine-devel mailing list