From d333da3dfa9513dcaa66875efdc4b330214f47de Mon Sep 17 00:00:00 2001 From: ch-ems Date: Mon, 25 Jun 2018 21:27:51 +0100 Subject: [PATCH] fixes issue with 0245bd5 --- src/widgets/BaseWindow.cpp | 6 +++--- src/widgets/BaseWindow.hpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index 252f724af..fd7603ec0 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -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 diff --git a/src/widgets/BaseWindow.hpp b/src/widgets/BaseWindow.hpp index f4505ec0d..5873ca1ac 100644 --- a/src/widgets/BaseWindow.hpp +++ b/src/widgets/BaseWindow.hpp @@ -94,6 +94,7 @@ private: } ui_; pajlada::Signals::SignalHolder connections_; + std::vector managedConnections; }; } // namespace chatterino