From 4d997a26b060b0ac436206df290a7a3402334cca Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 20 May 2022 23:33:22 +0400 Subject: [PATCH] Don't update global menu on Linux without focus widget The window loses focus when menu is open and edit options are deactivated --- Telegram/SourceFiles/platform/linux/main_window_linux.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 01ad33c24d..45d8287d50 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -568,7 +568,9 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *evt) { if (qobject_cast(obj) || qobject_cast(obj) || dynamic_cast(obj)) { - updateGlobalMenu(); + if (QApplication::focusWidget()) { + updateGlobalMenu(); + } } } return Window::MainWindow::eventFilter(obj, evt);