diff --git a/reactos/subsystems/win32/win32k/ntuser/winpos.c b/reactos/subsystems/win32/win32k/ntuser/winpos.c index 0570f717650..ea11ccea70b 100644 --- a/reactos/subsystems/win32/win32k/ntuser/winpos.c +++ b/reactos/subsystems/win32/win32k/ntuser/winpos.c @@ -1022,7 +1022,11 @@ co_WinPosSetWindowPos( if (InsertAfterWindow != NULL) UserDereferenceObject(InsertAfterWindow); if ((HWND_TOPMOST == WinPos.hwndInsertAfter) - && (IntIsDesktopWindow(Window->Parent))) + || (0 != (Window->Wnd->ExStyle & WS_EX_TOPMOST) + && NULL != Window->PrevSibling + && 0 != (Window->PrevSibling->Wnd->ExStyle & WS_EX_TOPMOST)) + || (NULL != Window->NextSibling + && 0 != (Window->NextSibling->Wnd->ExStyle & WS_EX_TOPMOST))) { Window->Wnd->ExStyle |= WS_EX_TOPMOST; }