fixes issue with 0245bd5

This commit is contained in:
ch-ems 2018-06-25 21:27:51 +01:00 committed by fourtf
parent 06350e9e14
commit d333da3dfa
2 changed files with 4 additions and 3 deletions

View file

@ -157,12 +157,12 @@ void BaseWindow::init()
// fourtf: don't ask me why we need to delay this
if (!(this->flags_ & Flags::TopMost)) {
QTimer::singleShot(1, this, [this] {
this->connections_.managedConnect(
getApp()->settings->windowTopMost.getValueChangedSignal(),
getApp()->settings->windowTopMost.connect(
[this](bool topMost, auto) {
::SetWindowPos(HWND(this->winId()), topMost ? HWND_TOPMOST : HWND_NOTOPMOST, 0,
0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
});
},
this->managedConnections);
});
}
#else

View file

@ -94,6 +94,7 @@ private:
} ui_;
pajlada::Signals::SignalHolder connections_;
std::vector<pajlada::Signals::ScopedConnection> managedConnections;
};
} // namespace chatterino