mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTUSER] Fix where linking newly created window is done (#4127)
Co-authored-by: I_Kill_Bugs <> CORE-12052
This commit is contained in:
parent
957e566a23
commit
f606fecb0d
1 changed files with 14 additions and 9 deletions
|
@ -2190,14 +2190,9 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
|
||||
Window->rcClient = Window->rcWindow;
|
||||
|
||||
/* Link the window */
|
||||
if (NULL != ParentWindow)
|
||||
if (Window->spwndNext || Window->spwndPrev)
|
||||
{
|
||||
/* Link the window into the siblings list */
|
||||
if ((Cs->style & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD)
|
||||
IntLinkHwnd(Window, HWND_BOTTOM);
|
||||
else
|
||||
IntLinkHwnd(Window, hwndInsertAfter);
|
||||
ERR("Window 0x%p has been linked too early!\n", Window);
|
||||
}
|
||||
|
||||
if (!(Window->state2 & WNDS2_WIN31COMPAT))
|
||||
|
@ -2210,10 +2205,10 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
{
|
||||
if ( !IntIsTopLevelWindow(Window) )
|
||||
{
|
||||
if (pti != Window->spwndParent->head.pti)
|
||||
if (pti != ParentWindow->head.pti)
|
||||
{
|
||||
//ERR("CreateWindow Parent in.\n");
|
||||
UserAttachThreadInput(pti, Window->spwndParent->head.pti, TRUE);
|
||||
UserAttachThreadInput(pti, ParentWindow->head.pti, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2226,6 +2221,16 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Link the window */
|
||||
if (ParentWindow != NULL)
|
||||
{
|
||||
/* Link the window into the siblings list */
|
||||
if ((Cs->style & (WS_CHILD | WS_MAXIMIZE)) == WS_CHILD)
|
||||
IntLinkHwnd(Window, HWND_BOTTOM);
|
||||
else
|
||||
IntLinkHwnd(Window, hwndInsertAfter);
|
||||
}
|
||||
|
||||
/* Send the WM_NCCALCSIZE message */
|
||||
{
|
||||
// RECT rc;
|
||||
|
|
Loading…
Reference in a new issue