mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
[win32k]
- Don't store LastChild in WINDOW_OBJECT svn path=/trunk/; revision=44591
This commit is contained in:
parent
7a9ae1c567
commit
196021c276
2 changed files with 27 additions and 15 deletions
|
@ -1060,11 +1060,6 @@ IntLinkWindow(
|
||||||
/* link after WndPrevSibling */
|
/* link after WndPrevSibling */
|
||||||
if ((Wnd->spwndNext = WndPrevSibling->spwndNext))
|
if ((Wnd->spwndNext = WndPrevSibling->spwndNext))
|
||||||
Wnd->spwndNext->spwndPrev = Wnd;
|
Wnd->spwndNext->spwndPrev = Wnd;
|
||||||
else if ((Parent = Wnd->spwndParent))
|
|
||||||
{
|
|
||||||
if(Parent->LastChild == WndPrevSibling)
|
|
||||||
Parent->LastChild = Wnd;
|
|
||||||
}
|
|
||||||
Wnd->spwndPrev->spwndNext = Wnd;
|
Wnd->spwndPrev->spwndNext = Wnd;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1075,7 +1070,6 @@ IntLinkWindow(
|
||||||
Wnd->spwndNext->spwndPrev = Wnd;
|
Wnd->spwndNext->spwndPrev = Wnd;
|
||||||
else if (Parent)
|
else if (Parent)
|
||||||
{
|
{
|
||||||
Parent->LastChild = Wnd;
|
|
||||||
Parent->spwndChild = Wnd;
|
Parent->spwndChild = Wnd;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,8 +1270,6 @@ IntUnlinkWindow(PWINDOW_OBJECT Wnd)
|
||||||
|
|
||||||
if (Wnd->spwndNext)
|
if (Wnd->spwndNext)
|
||||||
Wnd->spwndNext->spwndPrev = Wnd->spwndPrev;
|
Wnd->spwndNext->spwndPrev = Wnd->spwndPrev;
|
||||||
else if (WndParent && WndParent->LastChild == Wnd)
|
|
||||||
WndParent->LastChild = Wnd->spwndPrev;
|
|
||||||
|
|
||||||
if (Wnd->spwndPrev)
|
if (Wnd->spwndPrev)
|
||||||
Wnd->spwndPrev->spwndNext = Wnd->spwndNext;
|
Wnd->spwndPrev->spwndNext = Wnd->spwndNext;
|
||||||
|
@ -1956,7 +1948,6 @@ AllocErr:
|
||||||
|
|
||||||
Window->OwnerThread = PsGetCurrentThread();
|
Window->OwnerThread = PsGetCurrentThread();
|
||||||
Window->spwndChild = NULL;
|
Window->spwndChild = NULL;
|
||||||
Window->LastChild = NULL;
|
|
||||||
Window->spwndPrev = NULL;
|
Window->spwndPrev = NULL;
|
||||||
Window->spwndNext = NULL;
|
Window->spwndNext = NULL;
|
||||||
|
|
||||||
|
@ -2290,7 +2281,13 @@ AllocErr:
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT PrevSibling;
|
PWINDOW_OBJECT PrevSibling;
|
||||||
|
|
||||||
PrevSibling = ParentWindow->LastChild;
|
PrevSibling = ParentWindow->spwndChild;
|
||||||
|
|
||||||
|
if(PrevSibling)
|
||||||
|
{
|
||||||
|
while (PrevSibling->spwndNext)
|
||||||
|
PrevSibling = PrevSibling->spwndNext;
|
||||||
|
}
|
||||||
|
|
||||||
/* link window as bottom sibling */
|
/* link window as bottom sibling */
|
||||||
IntLinkWindow(Window, ParentWindow, PrevSibling /*prev sibling*/);
|
IntLinkWindow(Window, ParentWindow, PrevSibling /*prev sibling*/);
|
||||||
|
@ -3698,8 +3695,16 @@ UserGetWindow(HWND hWnd, UINT Relationship)
|
||||||
case GW_HWNDLAST:
|
case GW_HWNDLAST:
|
||||||
if((Parent = Window->spwndParent))
|
if((Parent = Window->spwndParent))
|
||||||
{
|
{
|
||||||
if (Parent->LastChild)
|
if (Parent->spwndChild)
|
||||||
hWndResult = Parent->LastChild->hSelf;
|
{
|
||||||
|
Window = Parent->spwndChild;
|
||||||
|
if(Window)
|
||||||
|
{
|
||||||
|
while(Window->spwndNext)
|
||||||
|
Window = Window->spwndNext;
|
||||||
|
}
|
||||||
|
hWndResult = Window->hSelf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1002,10 +1002,17 @@ co_WinPosSetWindowPos(
|
||||||
}
|
}
|
||||||
else if (WinPos.hwndInsertAfter == HWND_BOTTOM)
|
else if (WinPos.hwndInsertAfter == HWND_BOTTOM)
|
||||||
{
|
{
|
||||||
if(ParentWindow->LastChild)
|
if(ParentWindow->spwndChild)
|
||||||
{
|
{
|
||||||
UserReferenceObject(ParentWindow->LastChild);
|
InsertAfterWindow = ParentWindow->spwndChild;
|
||||||
InsertAfterWindow = ParentWindow->LastChild;
|
|
||||||
|
if(InsertAfterWindow)
|
||||||
|
{
|
||||||
|
while (InsertAfterWindow->spwndNext)
|
||||||
|
InsertAfterWindow = InsertAfterWindow->spwndNext;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserReferenceObject(InsertAfterWindow);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
InsertAfterWindow = NULL;
|
InsertAfterWindow = NULL;
|
||||||
|
|
Loading…
Reference in a new issue