fix: don't change the topmost value of child windows (#5330)

This commit is contained in:
nerix
2024-04-18 16:24:12 +02:00
committed by GitHub
parent b391f18177
commit 86a27823a2
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -263,6 +263,13 @@ void BaseWindow::tryApplyTopMost()
}
this->waitingForTopMost_ = false;
if (this->parent())
{
// Don't change the topmost value of child windows. This would apply
// to the top-level window too.
return;
}
::SetWindowPos(*hwnd, this->isTopMost_ ? HWND_TOPMOST : HWND_NOTOPMOST, 0,
0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}