fix(flatpak): global shortcuts not working (closes #7563)

This commit is contained in:
Elian Doran 2025-11-11 13:41:18 +02:00
parent 4e73f20165
commit a45b147462
No known key found for this signature in database

View File

@ -39,11 +39,16 @@ async function main() {
app.commandLine.appendSwitch("disable-smooth-scrolling");
}
// Electron 36 crashes with "Using GTK 2/3 and GTK 4 in the same process is not supported" on some distributions.
// See https://github.com/electron/electron/issues/46538 for more info.
if (process.platform === "linux") {
app.setName(PRODUCT_NAME);
// Electron 36 crashes with "Using GTK 2/3 and GTK 4 in the same process is not supported" on some distributions.
// See https://github.com/electron/electron/issues/46538 for more info.
app.commandLine.appendSwitch("gtk-version", "3");
// Enable global shortcuts in Flatpak
// the app runs in a Wayland session.
app.commandLine.appendSwitch("enable-features", "GlobalShortcutsPortal");
}
// Quit when all windows are closed, except on macOS. There, it's common