mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixes issue with 0245bd5
This commit is contained in:
parent
06350e9e14
commit
d333da3dfa
2 changed files with 4 additions and 3 deletions
|
@ -157,12 +157,12 @@ void BaseWindow::init()
|
||||||
// fourtf: don't ask me why we need to delay this
|
// fourtf: don't ask me why we need to delay this
|
||||||
if (!(this->flags_ & Flags::TopMost)) {
|
if (!(this->flags_ & Flags::TopMost)) {
|
||||||
QTimer::singleShot(1, this, [this] {
|
QTimer::singleShot(1, this, [this] {
|
||||||
this->connections_.managedConnect(
|
getApp()->settings->windowTopMost.connect(
|
||||||
getApp()->settings->windowTopMost.getValueChangedSignal(),
|
|
||||||
[this](bool topMost, auto) {
|
[this](bool topMost, auto) {
|
||||||
::SetWindowPos(HWND(this->winId()), topMost ? HWND_TOPMOST : HWND_NOTOPMOST, 0,
|
::SetWindowPos(HWND(this->winId()), topMost ? HWND_TOPMOST : HWND_NOTOPMOST, 0,
|
||||||
0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||||
});
|
},
|
||||||
|
this->managedConnections);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -94,6 +94,7 @@ private:
|
||||||
} ui_;
|
} ui_;
|
||||||
|
|
||||||
pajlada::Signals::SignalHolder connections_;
|
pajlada::Signals::SignalHolder connections_;
|
||||||
|
std::vector<pajlada::Signals::ScopedConnection> managedConnections;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
Loading…
Reference in a new issue