From 3e8526f0f763b6bd76217cfade65251ad51228ac Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 22 Apr 2022 20:30:09 +0200 Subject: [PATCH 1/2] Add wayland specific patches --- src/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.ts b/src/main.ts index bf042f9..ee90124 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,13 @@ export var settings: any; export var customTitlebar: boolean; export var tabs: boolean; +if (process.platform == "linux") { + if (process.env.$XDG_SESSION_TYPE == "wayland") { + console.log("Wayland specific patches applied.") + app.commandLine.appendSwitch("enable-features=UseOzonePlatform"); + app.commandLine.appendSwitch("ozone-platform=wayland"); + } +} checkIfConfigExists(); app.whenReady().then(async () => { From 4c8cd2bf57845d8502773f917d61f77aedf57f35 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 22 Apr 2022 20:39:00 +0200 Subject: [PATCH 2/2] Make window decorations work on Gnome Wayland --- src/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index ee90124..38dfa46 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,8 +15,12 @@ export var tabs: boolean; if (process.platform == "linux") { if (process.env.$XDG_SESSION_TYPE == "wayland") { console.log("Wayland specific patches applied.") - app.commandLine.appendSwitch("enable-features=UseOzonePlatform"); app.commandLine.appendSwitch("ozone-platform=wayland"); + if (process.env.$XDG_CURRENT_DESKTOP == "GNOME") { + app.commandLine.appendSwitch("enable-features=UseOzonePlatform,WaylandWindowDecorations"); + } else { + app.commandLine.appendSwitch("enable-features=UseOzonePlatform"); + } } } checkIfConfigExists();