Skip to content

Commit

Permalink
fix: don't change the topmost value of child windows (#5330)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Apr 18, 2024
1 parent b391f18 commit 86a2782
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Bugfix: Fixed split tooltip getting stuck in some cases. (#5309)
- Bugfix: Fixed the version string not showing up as expected in Finder on macOS. (#5311)
- Bugfix: Fixed links having `http://` added to the beginning in certain cases. (#5323)
- Bugfix: Fixed topmost windows from losing their status after opening dialogs on Windows. (#5330)
- Bugfix: Fixed a gap appearing when using filters on `/watching`. (#5329)

## 2.5.0-beta.1
Expand Down
7 changes: 7 additions & 0 deletions src/widgets/BaseWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 86a2782

Please sign in to comment.