From d85981cca0233f7def2bfeb90a0acdb697b97570 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 28 Apr 2021 10:36:15 +0400 Subject: [PATCH] Revert "Check if the window is not overlapped when is not active" This reverts commit 6b1bc1e845d911723f5582c511f49d5f1f8b1edb. Fixes #16188. Maybe add an option later. --- Telegram/SourceFiles/mainwindow.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index f60968c5d..9bad8c5f5 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -557,13 +557,8 @@ bool MainWindow::doWeMarkAsRead() { if (!_main || Ui::isLayerShown()) { return false; } - // for tile grid in case other windows have shadows - // i've seen some windows with >70px shadow margins - const auto margin = style::ConvertScale(100); - return Ui::IsContentVisible( - this, - inner().marginsRemoved(QMargins(margin, margin, margin, margin))) - && _main->doWeMarkAsRead(); + updateIsActive(); + return isActive() && _main->doWeMarkAsRead(); } void MainWindow::checkHistoryActivation() {