- SetParent shouldn't destroy menus.
- UserGetAncestor(Window, GA_ROOT) really shouldn't return NULL, in any case.
Modified: trunk/reactos/subsys/win32k/ntuser/window.c

Modified: trunk/reactos/subsys/win32k/ntuser/window.c
--- trunk/reactos/subsys/win32k/ntuser/window.c	2005-09-20 10:29:05 UTC (rev 17945)
+++ trunk/reactos/subsys/win32k/ntuser/window.c	2005-09-20 10:31:57 UTC (rev 17946)
@@ -878,7 +878,6 @@
    PWINDOW_OBJECT WndOldParent, Sibling, InsertAfter;
 //   HWND hWnd, hWndNewParent;
    BOOL WasVisible;
-   BOOL MenuChanged;
 
    ASSERT(Wnd);
    ASSERT(WndNewParent);
@@ -930,15 +929,6 @@
          IntLinkWindow(Wnd, WndNewParent, InsertAfter /*prev sibling*/);
 //         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 WndAncestor, Parent;
 
-   if (Wnd->hSelf == IntGetDesktopWindow())
-   {
-      return NULL;
-   }
-
    switch (Type)
    {
       case GA_PARENT: