Add setting to disable Chromium hardware acceleration (#847)

This commit is contained in:
Evan Simkowitz 2024-09-25 10:08:15 -07:00 committed by GitHub
parent 4d8075d7df
commit 4b665dec90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 8 deletions

View File

@ -852,6 +852,11 @@ async function appMain() {
fs.mkdirSync(waveHomeDir); fs.mkdirSync(waveHomeDir);
} }
makeAppMenu(); makeAppMenu();
const fullConfig = await services.FileService.GetFullConfig();
const settings = fullConfig.settings;
if (settings?.["window:disablehardwareacceleration"]) {
electronApp.disableHardwareAcceleration();
}
try { try {
await runWaveSrv(); await runWaveSrv();
} catch (e) { } catch (e) {

View File

@ -440,6 +440,7 @@ declare global {
"window:reducedmotion"?: boolean; "window:reducedmotion"?: boolean;
"window:tilegapsize"?: number; "window:tilegapsize"?: number;
"window:nativetitlebar"?: boolean; "window:nativetitlebar"?: boolean;
"window:disablehardwareacceleration"?: boolean;
"telemetry:*"?: boolean; "telemetry:*"?: boolean;
"telemetry:enabled"?: boolean; "telemetry:enabled"?: boolean;
}; };

View File

@ -47,6 +47,7 @@ const (
ConfigKey_WindowReducedMotion = "window:reducedmotion" ConfigKey_WindowReducedMotion = "window:reducedmotion"
ConfigKey_WindowTileGapSize = "window:tilegapsize" ConfigKey_WindowTileGapSize = "window:tilegapsize"
ConfigKey_WindowNativeTitleBar = "window:nativetitlebar" ConfigKey_WindowNativeTitleBar = "window:nativetitlebar"
ConfigKey_WindowDisableHardwareAcceleration = "window:disablehardwareacceleration"
ConfigKey_TelemetryClear = "telemetry:*" ConfigKey_TelemetryClear = "telemetry:*"
ConfigKey_TelemetryEnabled = "telemetry:enabled" ConfigKey_TelemetryEnabled = "telemetry:enabled"

View File

@ -73,14 +73,15 @@ type SettingsType struct {
WidgetClear bool `json:"widget:*,omitempty"` WidgetClear bool `json:"widget:*,omitempty"`
WidgetShowHelp bool `json:"widget:showhelp,omitempty"` WidgetShowHelp bool `json:"widget:showhelp,omitempty"`
WindowClear bool `json:"window:*,omitempty"` WindowClear bool `json:"window:*,omitempty"`
WindowTransparent bool `json:"window:transparent,omitempty"` WindowTransparent bool `json:"window:transparent,omitempty"`
WindowBlur bool `json:"window:blur,omitempty"` WindowBlur bool `json:"window:blur,omitempty"`
WindowOpacity *float64 `json:"window:opacity,omitempty"` WindowOpacity *float64 `json:"window:opacity,omitempty"`
WindowBgColor string `json:"window:bgcolor,omitempty"` WindowBgColor string `json:"window:bgcolor,omitempty"`
WindowReducedMotion bool `json:"window:reducedmotion,omitempty"` WindowReducedMotion bool `json:"window:reducedmotion,omitempty"`
WindowTileGapSize *int64 `json:"window:tilegapsize,omitempty"` WindowTileGapSize *int64 `json:"window:tilegapsize,omitempty"`
WindowNativeTitleBar bool `json:"window:nativetitlebar,omitempty"` WindowNativeTitleBar bool `json:"window:nativetitlebar,omitempty"`
WindowDisableHardwareAcceleration bool `json:"window:disablehardwareacceleration,omitempty"`
TelemetryClear bool `json:"telemetry:*,omitempty"` TelemetryClear bool `json:"telemetry:*,omitempty"`
TelemetryEnabled bool `json:"telemetry:enabled,omitempty"` TelemetryEnabled bool `json:"telemetry:enabled,omitempty"`