Fixed a crash that could occur on certain Linux systems when toggling the Always on Top flag. (#3385)

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

* Add changelog entry
This commit is contained in:
pajlada
2021-12-05 13:38:21 +01:00
committed by GitHub
parent 2c695a9ac5
commit b41df18933
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -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();
}