mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Disable restart on session start explicitly
This commit is contained in:
parent
06a4480520
commit
2743aee614
@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "facades.h"
|
#include "facades.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
|
||||||
|
#include <QtGui/QSessionManager>
|
||||||
#include <QtGui/QScreen>
|
#include <QtGui/QScreen>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
@ -132,6 +133,19 @@ int Sandbox::start() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// https://github.com/telegramdesktop/tdesktop/issues/948
|
||||||
|
// and https://github.com/telegramdesktop/tdesktop/issues/5022
|
||||||
|
const auto restartHint = [](QSessionManager &manager) {
|
||||||
|
manager.setRestartHint(QSessionManager::RestartNever);
|
||||||
|
};
|
||||||
|
|
||||||
|
connect(
|
||||||
|
this,
|
||||||
|
&QGuiApplication::saveStateRequest,
|
||||||
|
this,
|
||||||
|
restartHint,
|
||||||
|
Qt::DirectConnection);
|
||||||
|
|
||||||
if (cManyInstance()) {
|
if (cManyInstance()) {
|
||||||
LOG(("Many instance allowed, starting..."));
|
LOG(("Many instance allowed, starting..."));
|
||||||
singleInstanceChecked();
|
singleInstanceChecked();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user