mirror of
https://github.com/reactos/reactos.git
synced 2026-07-05 03:44:30 +08:00
Restore the pre-r17946 UserGetAncestor behaviour and fix the code calling it.
svn path=/trunk/; revision=17947
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user