-#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