2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Default to Wayland on GNOME for new installs

This commit is contained in:
Ilya Fedin
2022-07-28 07:33:04 +04:00
committed by John Preston
parent 7a61693034
commit bb8ffcac3a
2 changed files with 15 additions and 2 deletions

View File

@@ -638,6 +638,18 @@ void finish() {
void psNewVersion() {
Platform::InstallLauncher();
if (Local::oldSettingsVersion() > 0
&& Local::oldSettingsVersion() <= 4000002
&& qEnvironmentVariableIsSet("WAYLAND_DISPLAY")
&& DesktopEnvironment::IsGnome()
&& !QFile::exists(cWorkingDir() + qsl("tdata/nowayland"))) {
QFile f(cWorkingDir() + qsl("tdata/nowayland"));
if (f.open(QIODevice::WriteOnly)) {
f.write("1");
f.close();
Core::Restart(); // restart with X backend
}
}
}
void psSendToMenu(bool send, bool silent) {