mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Default to Wayland on GNOME for new installs
This commit is contained in:
parent
7a61693034
commit
bb8ffcac3a
2 changed files with 15 additions and 2 deletions
|
@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "platform/platform_launcher.h"
|
#include "platform/platform_launcher.h"
|
||||||
#include "platform/platform_specific.h"
|
#include "platform/platform_specific.h"
|
||||||
#include "platform/linux/linux_desktop_environment.h"
|
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "base/platform/base_platform_file_utilities.h"
|
#include "base/platform/base_platform_file_utilities.h"
|
||||||
#include "ui/main_queue_processor.h"
|
#include "ui/main_queue_processor.h"
|
||||||
|
@ -62,7 +61,9 @@ FilteredCommandLineArguments::FilteredCommandLineArguments(
|
||||||
#endif // !Q_OS_WIN
|
#endif // !Q_OS_WIN
|
||||||
}
|
}
|
||||||
#elif defined Q_OS_UNIX
|
#elif defined Q_OS_UNIX
|
||||||
if (Platform::DesktopEnvironment::IsGnome() && qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) {
|
if (QFile::exists(cWorkingDir() + qsl("tdata/nowayland"))
|
||||||
|
&& qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) {
|
||||||
|
LOG(("Wayland: Disable on old installations"));
|
||||||
pushArgument("-platform");
|
pushArgument("-platform");
|
||||||
pushArgument("xcb;wayland");
|
pushArgument("xcb;wayland");
|
||||||
}
|
}
|
||||||
|
|
|
@ -638,6 +638,18 @@ void finish() {
|
||||||
|
|
||||||
void psNewVersion() {
|
void psNewVersion() {
|
||||||
Platform::InstallLauncher();
|
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) {
|
void psSendToMenu(bool send, bool silent) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue