From 4b4de9d5aa949eba1d40e3beee7c0dd0b64242f2 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 23 Mar 2024 02:55:33 +0400 Subject: [PATCH] Don't mark as read when unexposed There's a yet another another visility state called "exposed" and the window could be unexposed while being not hidden and not minimized. When the window is unexposed, Qt doesn't draw and the user can't see changes for sure. --- Telegram/SourceFiles/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index d0f67b583..5e8724b37 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -517,6 +517,7 @@ bool MainWindow::markingAsRead() const { && !_layer && !isHidden() && !isMinimized() + && windowHandle()->isExposed() && (AutoScrollInactiveChat.value() || (isActive() && !_main->session().updates().isIdle())); }