mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user