mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[NTUSER] Fix SetActiveWindow return value
Apply set-active.patch. CORE-13257
This commit is contained in:
parent
7c2b22c4de
commit
1fbed1710e
|
@ -1667,7 +1667,6 @@ NtUserSetActiveWindow(HWND hWnd)
|
||||||
HWND hWndPrev;
|
HWND hWndPrev;
|
||||||
PWND Window, pwndPrev;
|
PWND Window, pwndPrev;
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
BOOL bActivated;
|
|
||||||
|
|
||||||
TRACE("Enter NtUserSetActiveWindow(%p)\n", hWnd);
|
TRACE("Enter NtUserSetActiveWindow(%p)\n", hWnd);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
@ -1688,11 +1687,9 @@ NtUserSetActiveWindow(HWND hWnd)
|
||||||
pwndPrev = gptiCurrent->MessageQueue->spwndActive;
|
pwndPrev = gptiCurrent->MessageQueue->spwndActive;
|
||||||
hWndPrev = (pwndPrev ? UserHMGetHandle(pwndPrev) : NULL);
|
hWndPrev = (pwndPrev ? UserHMGetHandle(pwndPrev) : NULL);
|
||||||
if (Window) UserRefObjectCo(Window, &Ref);
|
if (Window) UserRefObjectCo(Window, &Ref);
|
||||||
bActivated = UserSetActiveWindow(Window);
|
UserSetActiveWindow(Window);
|
||||||
if (Window) UserDerefObjectCo(Window);
|
if (Window) UserDerefObjectCo(Window);
|
||||||
if (!bActivated)
|
RETURN(hWndPrev ? (IntIsWindow(hWndPrev) ? hWndPrev : NULL) : NULL);
|
||||||
RETURN(NULL);
|
|
||||||
RETURN(hWndPrev ? hWndPrev : hWnd);
|
|
||||||
}
|
}
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue