mirror of
https://github.com/reactos/wine.git
synced 2024-12-03 17:31:15 +00:00
user32: Don't call IsChild with NULL window in EnableWindow.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4c54f9aeac
commit
a878f0a02a
@ -3091,7 +3091,9 @@ static void test_SetFocus(HWND hwnd)
|
||||
ShowWindow(child, SW_SHOW);
|
||||
SetFocus(child);
|
||||
ok( GetFocus() == child, "Focus should be on child %p\n", child );
|
||||
SetLastError(0xdeadbeef);
|
||||
EnableWindow(hwnd, FALSE);
|
||||
ok(GetLastError() == 0xdeadbeef, "got error %u in EnableWindow call\n", GetLastError());
|
||||
ok( GetFocus() == child, "Focus should still be on child %p\n", child );
|
||||
EnableWindow(hwnd, TRUE);
|
||||
|
||||
|
@ -2171,7 +2171,7 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
|
||||
SetFocus( 0 ); /* A disabled window can't have the focus */
|
||||
|
||||
capture_wnd = GetCapture();
|
||||
if (hwnd == capture_wnd || IsChild(hwnd, capture_wnd))
|
||||
if (capture_wnd && (hwnd == capture_wnd || IsChild(hwnd, capture_wnd)))
|
||||
ReleaseCapture(); /* A disabled window can't capture the mouse */
|
||||
|
||||
SendMessageW( hwnd, WM_ENABLE, FALSE, 0 );
|
||||
|
Loading…
Reference in New Issue
Block a user