[PATCH] winex11.drv: Request _NET_ACTIVE_WINDOW in SetFocus().

Zebediah Figura zfigura at codeweavers.com
Thu May 31 10:26:08 CDT 2018


On 05/31/2018 10:10 AM, Dmitry Timoshkov wrote:
> Zebediah Figura <zfigura at codeweavers.com> wrote:
> 
>>> New version of the patch still doesn't work here, same flickering in an
>>> infinite loop until I move mouse over the test's window.
>>>
>>
>> Thanks. It looks like Marco sends a WM_TAKE_FOCUS message when honouring
>> a request to become the active window. Since we call
>> SetForegroundWindow() inside of our WM_TAKE_FOCUS handler, we generate a
>> loop. This wouldn't be a problem, except that the application creates
>> two windows in quick succession before processing events, and Marco
>> generates one WM_TAKE_FOCUS message for each, so we essentially start
>> out one WM_TAKE_FOCUS message behind the most recent one.
>>
>> It's not clear to me what we should do about this; the spec doesn't seem
>> to explicitly forbid any of this behaviour, but neither does it say we
>> can depend on receiving WM_TAKE_FOCUS in response to a
>> _NET_ACTIVE_WINDOW request. Could someone more knowledgeable about X11
>> provide input?
> 
> Does the original version of the patch work for you? What is the reason
> of the changes you've made in the staged patch?
> 

It seems unnecessary to add a new driver function for SetActiveWindow. 
All three focus functions have the effect of raising/activating the 
window in the same way that _NET_ACTIVE_WINDOW does, and the Mac driver 
already activates and raises windows in its SetFocus() handler.



More information about the wine-devel mailing list