From 0d985b57457b4f34e01b3f7ca63b4d6469bcd2d7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 7 Oct 2022 15:46:07 +0400 Subject: [PATCH] Don't focus main button on progress show. --- Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index 0818aa15c..0aaf26335 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include #include +#include namespace Ui::BotWebView { namespace { @@ -273,7 +274,9 @@ void Panel::Button::setupProgressGeometry() { _progress->widget.show(); _progress->widget.raise(); - if (_progress->shown) { + if (_progress->shown + && Ui::AppInFocus() + && Ui::InFocusChain(_progress->widget.window())) { _progress->widget.setFocus(); } }