[ros-diffs] [navaraf] 16749: Fix reverting of focus to owner windows.

navaraf at svn.reactos.com navaraf at svn.reactos.com
Tue Jul 26 18:35:15 CEST 2005


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(;;)
   {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050726/22b3c7c1/attachment.html


More information about the Ros-diffs mailing list