From 26532ab9b4ba8033748a7374e7e97e1df1362f77 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 19 Sep 2017 22:15:13 +0300 Subject: [PATCH] Fix small chats list column bug with boxes. --- Telegram/SourceFiles/mainwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index f358007b26..84a3f9919d 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -712,10 +712,11 @@ void MainWindow::noLayerStack(LayerStackWidget *was) { void MainWindow::layerFinishedHide(LayerStackWidget *was) { if (was == _layerBg) { - auto resetFocus = (was == App::wnd()->focusWidget()); + auto resetFocus = Ui::InFocusChain(was); + if (resetFocus) setFocus(); destroyLayerDelayed(); - InvokeQueued(this, [this, resetFocus] { - if (resetFocus) setInnerFocus(); + if (resetFocus) setInnerFocus(); + InvokeQueued(this, [this] { checkHistoryActivation(); }); }