mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Add setting to disable Chromium hardware acceleration (#847)
This commit is contained in:
parent
4d8075d7df
commit
4b665dec90
@ -852,6 +852,11 @@ async function appMain() {
|
||||
fs.mkdirSync(waveHomeDir);
|
||||
}
|
||||
makeAppMenu();
|
||||
const fullConfig = await services.FileService.GetFullConfig();
|
||||
const settings = fullConfig.settings;
|
||||
if (settings?.["window:disablehardwareacceleration"]) {
|
||||
electronApp.disableHardwareAcceleration();
|
||||
}
|
||||
try {
|
||||
await runWaveSrv();
|
||||
} catch (e) {
|
||||
|
1
frontend/types/gotypes.d.ts
vendored
1
frontend/types/gotypes.d.ts
vendored
@ -440,6 +440,7 @@ declare global {
|
||||
"window:reducedmotion"?: boolean;
|
||||
"window:tilegapsize"?: number;
|
||||
"window:nativetitlebar"?: boolean;
|
||||
"window:disablehardwareacceleration"?: boolean;
|
||||
"telemetry:*"?: boolean;
|
||||
"telemetry:enabled"?: boolean;
|
||||
};
|
||||
|
@ -47,6 +47,7 @@ const (
|
||||
ConfigKey_WindowReducedMotion = "window:reducedmotion"
|
||||
ConfigKey_WindowTileGapSize = "window:tilegapsize"
|
||||
ConfigKey_WindowNativeTitleBar = "window:nativetitlebar"
|
||||
ConfigKey_WindowDisableHardwareAcceleration = "window:disablehardwareacceleration"
|
||||
|
||||
ConfigKey_TelemetryClear = "telemetry:*"
|
||||
ConfigKey_TelemetryEnabled = "telemetry:enabled"
|
||||
|
@ -81,6 +81,7 @@ type SettingsType struct {
|
||||
WindowReducedMotion bool `json:"window:reducedmotion,omitempty"`
|
||||
WindowTileGapSize *int64 `json:"window:tilegapsize,omitempty"`
|
||||
WindowNativeTitleBar bool `json:"window:nativetitlebar,omitempty"`
|
||||
WindowDisableHardwareAcceleration bool `json:"window:disablehardwareacceleration,omitempty"`
|
||||
|
||||
TelemetryClear bool `json:"telemetry:*,omitempty"`
|
||||
TelemetryEnabled bool `json:"telemetry:enabled,omitempty"`
|
||||
|
Loading…
Reference in New Issue
Block a user