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);
|
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) {
|
||||||
|
1
frontend/types/gotypes.d.ts
vendored
1
frontend/types/gotypes.d.ts
vendored
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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"
|
||||||
|
@ -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"`
|
||||||
|
Loading…
Reference in New Issue
Block a user