Commit 5dfcadd7 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user32: Do not change focus if the window is no longer active.

parent 16920c1d
......@@ -276,6 +276,9 @@ HWND WINAPI SetFocus( HWND hwnd )
{
if (!set_active_window( hwndTop, NULL, FALSE, FALSE )) return 0;
if (!IsWindow( hwnd )) return 0; /* Abort if window destroyed */
/* Do not change focus if the window is no longer active */
if (hwndTop != GetActiveWindow()) return 0;
}
}
else /* NULL hwnd passed in */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment