mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Implemented NtUserGetAncestor with GA_ROOT flag, stops winhello from crashing when clicking on the title bar.
svn path=/trunk/; revision=4828
This commit is contained in:
parent
1018ad9087
commit
7e41bced72
1 changed files with 24 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: window.c,v 1.51 2003/05/31 08:51:58 gvg Exp $
|
||||
/* $Id: window.c,v 1.52 2003/06/03 15:43:57 jvangael Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -94,6 +94,29 @@ NtUserGetAncestor(HWND hWnd, UINT Flags)
|
|||
|
||||
return(hParent);
|
||||
}
|
||||
else if (Flags & GA_ROOT)
|
||||
{
|
||||
PWINDOW_OBJECT Window;
|
||||
PWINDOW_OBJECT pChainEnumerator;
|
||||
HWND hRoot;
|
||||
|
||||
Window = W32kGetWindowObject(hWnd);
|
||||
if(Window == NULL)
|
||||
{
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
pChainEnumerator = Window;
|
||||
while(pChainEnumerator->Parent != NULL)
|
||||
{
|
||||
pChainEnumerator = pChainEnumerator->Parent;
|
||||
}
|
||||
|
||||
hRoot = pChainEnumerator->Self;
|
||||
W32kReleaseWindowObject(Window);
|
||||
|
||||
return(hRoot);
|
||||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
|
Loading…
Reference in a new issue