mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Restore the pre-r17946 UserGetAncestor behaviour and fix the code calling it.
svn path=/trunk/; revision=17947
This commit is contained in:
parent
27f30a175b
commit
dff3a0dd3a
2 changed files with 9 additions and 4 deletions
|
@ -520,7 +520,7 @@ HWND FASTCALL co_UserSetFocus(PWINDOW_OBJECT Window OPTIONAL)
|
|||
}
|
||||
|
||||
TopWnd = UserGetAncestor(Window, GA_ROOT);
|
||||
if (TopWnd->hSelf != UserGetActiveWindow())
|
||||
if (TopWnd && TopWnd->hSelf != UserGetActiveWindow())
|
||||
{
|
||||
// PWINDOW_OBJECT WndTops = UserGetWindowObject(hWndTop);
|
||||
UserRefObjectCo(TopWnd);
|
||||
|
|
|
@ -1374,9 +1374,9 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
|||
else
|
||||
{
|
||||
//temp hack
|
||||
PWINDOW_OBJECT Par = UserGetWindowObject(hWndParent);
|
||||
if (Par)
|
||||
OwnerWindowHandle = UserGetAncestor(Par, GA_ROOT)->hSelf;
|
||||
PWINDOW_OBJECT Par = UserGetWindowObject(hWndParent), Root;
|
||||
if (Par && (Root = UserGetAncestor(Par, GA_ROOT)))
|
||||
OwnerWindowHandle = Root->hSelf;
|
||||
}
|
||||
}
|
||||
else if ((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
|
@ -2543,6 +2543,11 @@ PWINDOW_OBJECT FASTCALL UserGetAncestor(PWINDOW_OBJECT Wnd, UINT Type)
|
|||
{
|
||||
PWINDOW_OBJECT WndAncestor, Parent;
|
||||
|
||||
if (Wnd->hSelf == IntGetDesktopWindow())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case GA_PARENT:
|
||||
|
|
Loading…
Reference in a new issue