2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-15 14:08:05 +00:00

Use RpWidget::windowActiveValue

This commit is contained in:
Ilya Fedin
2024-06-18 12:32:27 +04:00
committed by John Preston
parent 8a5797e1bd
commit a22cf8e303
8 changed files with 25 additions and 40 deletions

View File

@@ -139,7 +139,9 @@ void MainWindow::finishFirstShow() {
applyInitialWorkMode();
createGlobalMenu();
windowDeactivateEvents(
windowActiveValue(
) | rpl::skip(1) | rpl::filter(
!rpl::mappers::_1
) | rpl::start_with_next([=] {
Ui::Tooltip::Hide();
}, lifetime());
@@ -594,7 +596,7 @@ bool MainWindow::eventFilter(QObject *object, QEvent *e) {
case QEvent::ApplicationActivate: {
if (object == QCoreApplication::instance()) {
InvokeQueued(this, [=] {
handleActiveChanged();
handleActiveChanged(isActiveWindow());
});
}
} break;