diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c0f87621..498aec9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index bc966f33c..f3ded0b13 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -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(); }