2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 00:25:17 +00:00

Fix mouse/keyboard input on Windows.

This commit is contained in:
John Preston
2020-12-18 12:43:51 +04:00
parent f8039f9b99
commit d301601360
2 changed files with 4 additions and 3 deletions

View File

@@ -311,9 +311,6 @@ void Launcher::init() {
// and https://github.com/telegramdesktop/tdesktop/issues/7549 // and https://github.com/telegramdesktop/tdesktop/issues/7549
// and https://github.com/telegramdesktop/tdesktop/issues/948 // and https://github.com/telegramdesktop/tdesktop/issues/948
// more info: https://doc.qt.io/qt-5/qguiapplication.html#isFallbackSessionManagementEnabled // more info: https://doc.qt.io/qt-5/qguiapplication.html#isFallbackSessionManagementEnabled
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QApplication::setAttribute(Qt::AA_DisableSessionManager, true);
#endif // Qt >= 5.14
QApplication::setFallbackSessionManagementEnabled(false); QApplication::setFallbackSessionManagementEnabled(false);
initHook(); initHook();

View File

@@ -50,6 +50,10 @@ Launcher::Launcher(int argc, char *argv[])
} }
void Launcher::initHook() { void Launcher::initHook() {
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QApplication::setAttribute(Qt::AA_DisableSessionManager, true);
#endif // Qt >= 5.14
QApplication::setDesktopFileName(GetLauncherFilename()); QApplication::setDesktopFileName(GetLauncherFilename());
} }