Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Fixed a crash that could occur on certain Linux systems when toggling…
Browse files Browse the repository at this point in the history
… the Always on Top flag. (Chatterino#3385)

* Get `isVisible` value *before* toggling AlwaysOnTop hint

* Add changelog entry
  • Loading branch information
pajlada authored Dec 5, 2021
1 parent 2c695a9 commit b41df18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
- Bugfix: Fixed Chatterino attempting to send empty messages (#3355)
- Bugfix: Fixed IRC highlights not triggering sounds or alerts properly. (#3368)
- Bugfix: Fixed IRC /kick command crashing if parameters were malformed. (#3382)
- Bugfix: Fixed a crash that could occur on certain Linux systems when toggling the Always on Top flag. (#3385)
- Dev: Add GitHub action to test builds without precompiled headers enabled. (#3327)
- Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103)
- Dev: Add benchmarks that can be compiled with the `BUILD_BENCHMARKS` CMake flag. Off by default. (#3038)
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/BaseWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ void BaseWindow::init()
{
getSettings()->windowTopMost.connect(
[this](bool topMost, auto) {
auto isVisible = this->isVisible();
this->setWindowFlag(Qt::WindowStaysOnTopHint, topMost);
if (this->isVisible())
if (isVisible)
{
this->show();
}
Expand Down

0 comments on commit b41df18

Please sign in to comment.