allowing hotswapping the top-most setting on windows

This commit is contained in:
fourtf
2018-05-23 12:31:03 +02:00
parent 67e580059c
commit eb25e863e3
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -115,9 +115,16 @@ void BaseWindow::init()
}
#endif
#ifdef USEWINSDK
app->settings->windowTopMost.connect([this](bool topMost, auto) {
::SetWindowPos((HWND)this->winId(), topMost ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE);
});
#else
if (app->settings->windowTopMost.getValue()) {
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
}
#endif
}
void BaseWindow::setStayInScreenRect(bool value)