Fix reverting of focus to owner windows.
Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c

Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c
--- trunk/reactos/subsys/win32k/ntuser/winpos.c	2005-07-26 16:03:46 UTC (rev 16748)
+++ trunk/reactos/subsys/win32k/ntuser/winpos.c	2005-07-26 16:34:48 UTC (rev 16749)
@@ -114,6 +114,29 @@
     IntSetFocusMessageQueue(NULL);
     return;
   }
+  if ((Window->Style & WS_POPUP) && (Wnd = IntGetOwner(Window)))
+  {
+    for(;;)
+    {
+      Old = Wnd;
+      Wnd = IntGetParentObject(Wnd);
+      if(IntIsDesktopWindow(Wnd))
+      {
+        IntReleaseWindowObject(Wnd);
+        Wnd = Old;
+        break;
+      }
+      IntReleaseWindowObject(Old);
+    }
+
+    if (IntSetForegroundWindow(Wnd))
+    {
+      IntReleaseWindowObject(Wnd);
+      return;
+    }
+
+    IntReleaseWindowObject(Wnd);
+  }
   Wnd = Window;
   for(;;)
   {