Fixes #134612: Added electron flags for wayland
ozone-platform flag will be parsed from runtime argv.json file.
This commit is contained in:
parent
9472f26109
commit
4116982d61
13
src/main.js
13
src/main.js
|
@ -167,6 +167,9 @@ function configureCommandlineSwitchesSync(cliArgs) {
|
|||
|
||||
// Force enable screen readers on Linux via this flag
|
||||
SUPPORTED_ELECTRON_SWITCHES.push('force-renderer-accessibility');
|
||||
|
||||
// Specify ozone platform implementation to use.
|
||||
SUPPORTED_ELECTRON_SWITCHES.push('ozone-platform');
|
||||
}
|
||||
|
||||
const SUPPORTED_MAIN_PROCESS_SWITCHES = [
|
||||
|
@ -194,7 +197,7 @@ function configureCommandlineSwitchesSync(cliArgs) {
|
|||
}
|
||||
}
|
||||
|
||||
// Others
|
||||
// Other 'enabled' flags
|
||||
else if (argvValue === true || argvValue === 'true') {
|
||||
if (argvKey === 'disable-hardware-acceleration') {
|
||||
app.disableHardwareAcceleration(); // needs to be called explicitly
|
||||
|
@ -202,6 +205,14 @@ function configureCommandlineSwitchesSync(cliArgs) {
|
|||
app.commandLine.appendSwitch(argvKey);
|
||||
}
|
||||
}
|
||||
|
||||
// ozone platform
|
||||
else if (argvKey === 'ozone-platform') {
|
||||
if (argvValue) {
|
||||
app.commandLine.appendSwitch(argvKey, argvValue);
|
||||
app.commandLine.appendSwitch('enable-features', 'UseOzonePlatform');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Append main process flags to process.argv
|
||||
|
|
|
@ -317,6 +317,10 @@ import { TELEMETRY_SETTING_ID } from 'vs/platform/telemetry/common/telemetry';
|
|||
type: 'boolean',
|
||||
description: localize('argv.force-renderer-accessibility', 'Forces the renderer to be accessible. ONLY change this if you are using a screen reader on Linux. On other platforms the renderer will automatically be accessible. This flag is automatically set if you have editor.accessibilitySupport: on.'),
|
||||
};
|
||||
schema.properties!['ozone-platform'] = {
|
||||
type: 'string',
|
||||
description: localize('argv.ozone-platform', "Configures the ozone platform implementation to be used by the runtime. Allowed values are 'wayland', 'x11'."),
|
||||
};
|
||||
}
|
||||
|
||||
jsonRegistry.registerSchema(argvDefinitionFileSchemaId, schema);
|
||||
|
|
Loading…
Reference in a new issue