From 77d1f64e0ec7350f34fa11a1f7d020d3f1140fb1 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 14 May 2020 21:31:32 +0400 Subject: [PATCH] Disable fallback session management --- Telegram/SourceFiles/core/launcher.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index 1d04386ee..d53288639 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -283,6 +283,14 @@ void Launcher::init() { QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); #endif // OS_MAC_OLD + // fallback session management is useless for tdesktop since it doesn't have + // any "are you sure you want to close this window?" dialogs + // but it produces bugs like https://github.com/telegramdesktop/tdesktop/issues/5022 + // and https://github.com/telegramdesktop/tdesktop/issues/7549 + // and https://github.com/telegramdesktop/tdesktop/issues/948 + // more info: https://doc.qt.io/qt-5/qguiapplication.html#isFallbackSessionManagementEnabled + QApplication::setFallbackSessionManagementEnabled(false); + initHook(); }