From 8f3c3b2a54dc67ee803ce4de1472305465f6a109 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 10 Nov 2022 14:11:35 +0300 Subject: [PATCH] Fixed switching between accounts with filters at screen edge. --- Telegram/SourceFiles/window/main_window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index 3187b19283..e3dd7554e2 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -587,6 +587,12 @@ void MainWindow::updateMinimumSize() { void MainWindow::recountGeometryConstraints() { updateMinimumSize(); + { + // Resizing to a new minimum size (larger than before) + // may cause the window to go out of bounds. + savePosition(Qt::WindowActive); + setGeometry(countInitialGeometry(positionFromSettings())); + } updateControlsGeometry(); fixOrder(); }