mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Fix window activations handling without event loop nesting.
This was causing an assertion violation in Ui::PostponeCall. - Add a generic Core::QtSignalProducer to convert Qt signals to rpl::producer. - Track event loop nesting inside QtSignalProducer. - Use QtSignalProducer for QWindow::activeChanged tracking.
This commit is contained in:
@@ -106,7 +106,14 @@ void MainWindow::initHook() {
|
||||
Platform::MainWindow::initHook();
|
||||
|
||||
QCoreApplication::instance()->installEventFilter(this);
|
||||
connect(windowHandle(), &QWindow::activeChanged, this, [this] { checkHistoryActivation(); }, Qt::QueuedConnection);
|
||||
|
||||
// Non-queued activeChanged handlers must use QtSignalProducer.
|
||||
connect(
|
||||
windowHandle(),
|
||||
&QWindow::activeChanged,
|
||||
this,
|
||||
[=] { checkHistoryActivation(); },
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void MainWindow::firstShow() {
|
||||
|
Reference in New Issue
Block a user