- Code cleanup and update. Change trace to error for tracking.
authorJames Tabor <james.tabor@reactos.org>
Sun, 2 Mar 2014 22:39:02 +0000 (22:39 +0000)
committerJames Tabor <james.tabor@reactos.org>
Sun, 2 Mar 2014 22:39:02 +0000 (22:39 +0000)
svn path=/trunk/; revision=62404

reactos/win32ss/user/ntuser/winpos.c

index da0f7e8..7919b9a 100644 (file)
@@ -1381,7 +1381,7 @@ co_WinPosDoWinPosChanging(PWND Window,
  *
  * FIXME: hide/show owned popups when owner visibility changes.
  *
  *
  * FIXME: hide/show owned popups when owner visibility changes.
  *
- * ReactOS: See bug 6751 and 7228.
+ * ReactOS: See bug CORE-6129 and CORE-6554.
  *
  */
  ////
  *
  */
  ////
@@ -1450,7 +1450,7 @@ WinPosDoOwnedPopups(PWND Window, HWND hWndInsertAfter)
 
    if (hWndInsertAfter == HWND_BOTTOM)
    {
 
    if (hWndInsertAfter == HWND_BOTTOM)
    {
-      TRACE("Window is HWND_BOTTOM\n");
+      ERR("Window is HWND_BOTTOM\n");
       if (List) ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
       goto done;
    }
       if (List) ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
       goto done;
    }
@@ -1721,7 +1721,6 @@ co_WinPosSetWindowPos(
    RECTL CopyRect;
    PWND Ancestor;
    BOOL bPointerInWindow;
    RECTL CopyRect;
    PWND Ancestor;
    BOOL bPointerInWindow;
-   //BOOL bNoTopMost;
 
    ASSERT_REFS_CO(Window);
 
 
    ASSERT_REFS_CO(Window);
 
@@ -1760,9 +1759,6 @@ co_WinPosSetWindowPos(
 
    co_WinPosDoWinPosChanging(Window, &WinPos, &NewWindowRect, &NewClientRect);
 
 
    co_WinPosDoWinPosChanging(Window, &WinPos, &NewWindowRect, &NewClientRect);
 
-   // HWND_NOTOPMOST is redirected in WinPosFixupFlags.
-   //bNoTopMost = WndInsertAfter == HWND_NOTOPMOST;
-
    /* Does the window still exist? */
    if (!IntIsWindow(WinPos.hwnd))
    {
    /* Does the window still exist? */
    if (!IntIsWindow(WinPos.hwnd))
    {
@@ -1823,70 +1819,6 @@ co_WinPosSetWindowPos(
    if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow())
    {
       IntLinkHwnd(Window, WinPos.hwndInsertAfter);
    if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow())
    {
       IntLinkHwnd(Window, WinPos.hwndInsertAfter);
-#if 0
-      //// Fix bug 6751 & 7228 see WinPosDoOwnedPopups wine Fixme.
-      PWND ParentWindow;
-      PWND Sibling;
-      PWND InsertAfterWindow;
-
-      if ((ParentWindow = Window->spwndParent)) // Must have a Parent window!
-      {
-         //ERR("SetWindowPos has parent window.\n");
-         if (WinPos.hwndInsertAfter == HWND_TOPMOST)
-         {
-            InsertAfterWindow = NULL;
-         }
-         else if ( WinPos.hwndInsertAfter == HWND_TOP )
-         {
-            InsertAfterWindow = NULL;
-
-            Sibling = ParentWindow->spwndChild;
-
-            while ( Sibling && Sibling->ExStyle & WS_EX_TOPMOST )
-            {
-               InsertAfterWindow = Sibling;
-               Sibling = Sibling->spwndNext;
-            }
-         }
-         else if (WinPos.hwndInsertAfter == HWND_BOTTOM)
-         {
-            if (ParentWindow->spwndChild)
-            {
-               InsertAfterWindow = ParentWindow->spwndChild;
-
-               if(InsertAfterWindow)
-               {
-                  while (InsertAfterWindow->spwndNext)
-                     InsertAfterWindow = InsertAfterWindow->spwndNext;
-               }
-            }
-            else
-               InsertAfterWindow = NULL;
-         }
-         else
-            InsertAfterWindow = IntGetWindowObject(WinPos.hwndInsertAfter);
-         /* Do nothing if hwndInsertAfter is HWND_BOTTOM and Window is already
-            the last window */
-         if (InsertAfterWindow != Window)
-         {
-            IntUnlinkWindow(Window);
-            IntLinkWindow(Window, InsertAfterWindow);
-         }
-
-         if ( ( WinPos.hwndInsertAfter == HWND_TOPMOST ||
-               ( Window->ExStyle & WS_EX_TOPMOST && Window->spwndPrev && Window->spwndPrev->ExStyle & WS_EX_TOPMOST ) ||
-               ( Window->spwndNext && Window->spwndNext->ExStyle & WS_EX_TOPMOST ) ) &&
-               !bNoTopMost )
-         {
-            Window->ExStyle |= WS_EX_TOPMOST;
-         }
-         else
-         {
-            Window->ExStyle &= ~ WS_EX_TOPMOST;
-         }
-      }
-      ////
-#endif
    }
 
    OldWindowRect = Window->rcWindow;
    }
 
    OldWindowRect = Window->rcWindow;