From 1a7996de6820d12b5a3ed97842fc8821c78537f7 Mon Sep 17 00:00:00 2001 From: illode <114271894+illode@users.noreply.github.com> Date: Sun, 3 Sep 2023 14:49:09 +0000 Subject: [PATCH] Make it possible to run under Wayland (#2178) * Allow passing chromium flags needed for Wayland support (#1527) * Add desktopName field to package.json to fix missing icon in Wayland --- package.json | 1 + src/main/arguments.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/package.json b/package.json index 169ce5cca..fb347082d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "chainner", "productName": "chaiNNer", + "desktopName": "chainner.desktop", "version": "0.19.4", "description": "A flowchart based image processing GUI", "main": ".webpack/main", diff --git a/src/main/arguments.ts b/src/main/arguments.ts index 231044cb5..2b0302350 100644 --- a/src/main/arguments.ts +++ b/src/main/arguments.ts @@ -75,6 +75,21 @@ export const parseArgs = (args: readonly string[]): ParsedArguments => { 'An internal developer option to use a different backend. Do not use this as this is not a stable option and may change or disappear at any time', hidden: true, }, + // These are never used by chaiNNer, they just let the arguments through the arg parser so chromium can parse them. + // Since they aren't used, the defaults don't matter + 'ozone-platform-hint': { + type: 'string', + default: '', + description: + "On Linux, set to 'auto' to use Wayland if it's available, and X otherwise", + hidden: true, + }, + 'enable-features': { + type: 'string', + default: '', + description: 'Enable chromium features', + hidden: true, + }, }) .parserConfiguration({ 'unknown-options-as-args': true }) .parseSync();