mirror of
https://github.com/reactos/reactos.git
synced 2024-09-05 18:26:53 +00:00
- SetParent shouldn't destroy menus.
- UserGetAncestor(Window, GA_ROOT) really shouldn't return NULL, in any case. svn path=/trunk/; revision=17946
This commit is contained in:
parent
0bec9aee61
commit
27f30a175b
|
@ -878,7 +878,6 @@ co_IntSetParent(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndNewParent)
|
||||||
PWINDOW_OBJECT WndOldParent, Sibling, InsertAfter;
|
PWINDOW_OBJECT WndOldParent, Sibling, InsertAfter;
|
||||||
// HWND hWnd, hWndNewParent;
|
// HWND hWnd, hWndNewParent;
|
||||||
BOOL WasVisible;
|
BOOL WasVisible;
|
||||||
BOOL MenuChanged;
|
|
||||||
|
|
||||||
ASSERT(Wnd);
|
ASSERT(Wnd);
|
||||||
ASSERT(WndNewParent);
|
ASSERT(WndNewParent);
|
||||||
|
@ -930,15 +929,6 @@ co_IntSetParent(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndNewParent)
|
||||||
IntLinkWindow(Wnd, WndNewParent, InsertAfter /*prev sibling*/);
|
IntLinkWindow(Wnd, WndNewParent, InsertAfter /*prev sibling*/);
|
||||||
// UserDerefObject(InsertAfter);
|
// UserDerefObject(InsertAfter);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WndNewParent->hSelf != IntGetDesktopWindow()) /* a child window */
|
|
||||||
{
|
|
||||||
if (!(Wnd->Style & WS_CHILD))
|
|
||||||
{
|
|
||||||
//if ( Wnd->Menu ) DestroyMenu ( Wnd->menu );
|
|
||||||
IntSetMenu(Wnd, NULL, &MenuChanged);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2553,11 +2543,6 @@ PWINDOW_OBJECT FASTCALL UserGetAncestor(PWINDOW_OBJECT Wnd, UINT Type)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT WndAncestor, Parent;
|
PWINDOW_OBJECT WndAncestor, Parent;
|
||||||
|
|
||||||
if (Wnd->hSelf == IntGetDesktopWindow())
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case GA_PARENT:
|
case GA_PARENT:
|
||||||
|
|
Loading…
Reference in a new issue