Need to check for focus and capture also on the children of the window
being disabled.
This commit is contained in:
parent
f6be044d62
commit
481f8ffeba
|
@ -1701,10 +1701,10 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
|
||||||
|
|
||||||
WIN_SetStyle( hwnd, style | WS_DISABLED );
|
WIN_SetStyle( hwnd, style | WS_DISABLED );
|
||||||
|
|
||||||
if (hwnd == GetFocus())
|
if (hwnd == GetFocus() || IsChild(hwnd, GetFocus()))
|
||||||
SetFocus( 0 ); /* A disabled window can't have the focus */
|
SetFocus( 0 ); /* A disabled window can't have the focus */
|
||||||
|
|
||||||
if (hwnd == GetCapture())
|
if (hwnd == GetCapture() || IsChild(hwnd, GetCapture()))
|
||||||
ReleaseCapture(); /* A disabled window can't capture the mouse */
|
ReleaseCapture(); /* A disabled window can't capture the mouse */
|
||||||
|
|
||||||
SendMessageA( hwnd, WM_ENABLE, FALSE, 0 );
|
SendMessageA( hwnd, WM_ENABLE, FALSE, 0 );
|
||||||
|
|
Loading…
Reference in New Issue