[PATCH 1/2] user32: Improve SetFocus implementation
Piotr Caban
piotr at codeweavers.com
Wed Mar 19 05:12:09 CDT 2014
On 03/19/14 10:51, Alexandre Julliard wrote:
> Piotr Caban <piotr at codeweavers.com> writes:
>
>> ---
>> dlls/user32/focus.c | 1 +
>> dlls/user32/tests/win.c | 4 ++++
>> 2 files changed, 5 insertions(+)
>>
>>
>>
>> diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c
>> index bd2e572..c47a82d 100644
>> --- a/dlls/user32/focus.c
>> +++ b/dlls/user32/focus.c
>> @@ -277,6 +277,7 @@ HWND WINAPI SetFocus( HWND hwnd )
>> HWND parent;
>> LONG style = GetWindowLongW( hwndTop, GWL_STYLE );
>> if (style & (WS_MINIMIZE | WS_DISABLED)) return 0;
>> + if (!(style & WS_CHILD)) break;
>
> It doesn't look right to allow setting focus if a parent is
> disabled. This would need more tests.
At least on Windows 7 it's possible to set focus if parent is disabled
and child has no WS_CHILD flag. I'll write more tests.
I'll also try to check why the tests are currently failing on testbot
before sending it again.
Thanks,
Piotr
More information about the wine-devel
mailing list