Piotr Caban <piotr(a)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. Also please write a better description of the change, "improve implementation" is not very helpful. -- Alexandre Julliard julliard(a)winehq.org