From 1963fca7d3832bf61661a13d6a6e19483bdb4ddc Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 30 Jun 2019 16:21:53 +0300 Subject: [PATCH] Fixed media overlay closing with Back mouse button. - Fixed #2998. --- Telegram/SourceFiles/mainwidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index a59f756bc..f95a51ef4 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2706,7 +2706,9 @@ bool MainWidget::eventFilter(QObject *o, QEvent *e) { } } else if (e->type() == QEvent::MouseButtonPress) { if (static_cast(e)->button() == Qt::BackButton) { - handleHistoryBack(); + if (!Core::App().hideMediaView()) { + handleHistoryBack(); + } return true; } } else if (e->type() == QEvent::Wheel) {