mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[NTUSER] Fix co_IntSetParent when calling on itself (#6365)
* Patch by @I_Kill_Bugs. * Provide explanation for change. CORE-9386
This commit is contained in:
parent
db93cb1709
commit
515f998f0d
|
@ -1218,8 +1218,9 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent)
|
||||||
|
|
||||||
if (WndOldParent) UserReferenceObject(WndOldParent); /* Caller must deref */
|
if (WndOldParent) UserReferenceObject(WndOldParent); /* Caller must deref */
|
||||||
|
|
||||||
if (WndNewParent != WndOldParent)
|
/* Even if WndNewParent == WndOldParent continue because the
|
||||||
{
|
* child window (Wnd) should be moved to the top of the z-order */
|
||||||
|
|
||||||
/* Unlink the window from the siblings list */
|
/* Unlink the window from the siblings list */
|
||||||
IntUnlinkWindow(Wnd);
|
IntUnlinkWindow(Wnd);
|
||||||
Wnd->ExStyle2 &= ~WS_EX2_LINKED;
|
Wnd->ExStyle2 &= ~WS_EX2_LINKED;
|
||||||
|
@ -1231,7 +1232,7 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent)
|
||||||
Wnd->spwndOwner &&
|
Wnd->spwndOwner &&
|
||||||
Wnd->spwndOwner->ExStyle & WS_EX_TOPMOST)
|
Wnd->spwndOwner->ExStyle & WS_EX_TOPMOST)
|
||||||
{
|
{
|
||||||
ERR("SetParent Top Most from Pop up!\n");
|
ERR("SetParent Top Most from Pop up\n");
|
||||||
Wnd->ExStyle |= WS_EX_TOPMOST;
|
Wnd->ExStyle |= WS_EX_TOPMOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1239,7 +1240,6 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent)
|
||||||
IntLinkHwnd(Wnd,
|
IntLinkHwnd(Wnd,
|
||||||
((0 == (Wnd->ExStyle & WS_EX_TOPMOST) &&
|
((0 == (Wnd->ExStyle & WS_EX_TOPMOST) &&
|
||||||
UserIsDesktopWindow(WndNewParent)) ? HWND_TOP : HWND_TOPMOST));
|
UserIsDesktopWindow(WndNewParent)) ? HWND_TOP : HWND_TOPMOST));
|
||||||
}
|
|
||||||
|
|
||||||
if ( WndNewParent == co_GetDesktopWindow(Wnd) &&
|
if ( WndNewParent == co_GetDesktopWindow(Wnd) &&
|
||||||
!(Wnd->style & WS_CLIPSIBLINGS) )
|
!(Wnd->style & WS_CLIPSIBLINGS) )
|
||||||
|
|
Loading…
Reference in a new issue