Fix environment access for Linux Wayland patches (#304)

This commit is contained in:
Christopher Snowhill 2022-12-17 01:06:40 -08:00 committed by GitHub
parent a725512e35
commit 969d1c3662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,10 +28,10 @@ if (!app.requestSingleInstanceLock()) {
crashReporter.start({uploadToServer: false, extra: {settingsFile}});
if (process.platform == "linux") {
if (process.env.$XDG_SESSION_TYPE == "wayland") {
if (process.env.XDG_SESSION_TYPE == "wayland") {
console.log("Wayland specific patches applied.");
app.commandLine.appendSwitch("ozone-platform=wayland");
if (process.env.$XDG_CURRENT_DESKTOP == "GNOME") {
if (process.env.XDG_CURRENT_DESKTOP == "GNOME") {
app.commandLine.appendSwitch("enable-features=UseOzonePlatform,WaylandWindowDecorations");
} else {
app.commandLine.appendSwitch("enable-features=UseOzonePlatform");