From ccdbedb93cf46fe81d2d559a22496770e4a26826 Mon Sep 17 00:00:00 2001 From: Daniel <24928223+dnsge@users.noreply.github.com> Date: Sat, 30 May 2020 05:32:25 -0400 Subject: [PATCH] Fix "Always on top" setting for MacOS and Linux (#1708) Closes #1166 --- src/widgets/BaseWindow.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index 3f1f2140..a0e0287f 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -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 }