mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
USE_WAYLAND env value handler
This commit is contained in:
parent
e6cc8689f0
commit
6355082718
1 changed files with 12 additions and 9 deletions
21
src/main.ts
21
src/main.ts
|
@ -25,15 +25,18 @@ if (!app.requestSingleInstanceLock()) {
|
||||||
} else {
|
} else {
|
||||||
// Your data now belongs to CCP
|
// Your data now belongs to CCP
|
||||||
crashReporter.start({uploadToServer: false});
|
crashReporter.start({uploadToServer: false});
|
||||||
|
if (process.env.USE_WAYLAND == "0") {
|
||||||
if (process.platform == "linux") {
|
console.log("Wayland patches disabled.");
|
||||||
if (process.env.XDG_SESSION_TYPE == "wayland") {
|
} else {
|
||||||
console.log("Wayland specific patches applied.");
|
if (process.platform == "linux") {
|
||||||
app.commandLine.appendSwitch("ozone-platform=wayland");
|
if (process.env.XDG_SESSION_TYPE == "wayland") {
|
||||||
if (process.env.XDG_CURRENT_DESKTOP == "GNOME") {
|
console.log("Wayland specific patches applied.");
|
||||||
app.commandLine.appendSwitch("enable-features=UseOzonePlatform,WaylandWindowDecorations");
|
app.commandLine.appendSwitch("ozone-platform=wayland");
|
||||||
} else {
|
if (process.env.XDG_CURRENT_DESKTOP == "GNOME") {
|
||||||
app.commandLine.appendSwitch("enable-features=UseOzonePlatform");
|
app.commandLine.appendSwitch("enable-features=UseOzonePlatform,WaylandWindowDecorations");
|
||||||
|
} else {
|
||||||
|
app.commandLine.appendSwitch("enable-features=UseOzonePlatform");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue