Fix "Always on top" setting for MacOS and Linux (#1708)

Closes #1166
This commit is contained in:
Daniel 2020-05-30 05:32:25 -04:00 committed by GitHub
parent 6d5ba0c442
commit ccdbedb93c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,9 +214,14 @@ void BaseWindow::init()
});
}
#else
// if (getSettings()->windowTopMost.getValue()) {
// this->setWindowFlag(Qt::WindowStaysOnTopHint);
// }
// TopMost flag overrides setting
if (!this->flags_.has(TopMost))
{
getSettings()->windowTopMost.connect([this](bool topMost, auto) {
this->setWindowFlag(Qt::WindowStaysOnTopHint, topMost);
this->show();
});
}
#endif
}