mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
In NewWindow, set options.Linux.WebviewGpuPolicy to WebviewGpuPolicyNever if options.Linux is nil, disabling GPU acceleration by default on linux until the upstream bugs https://bugs.webkit.org/show_bug.cgi?id=228268 and https://bugs.webkit.org/show_bug.cgi?id=261874 are fixed.
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/wailsapp/wails/v2/internal/frontend"
|
||||
"github.com/wailsapp/wails/v2/pkg/menu"
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/linux"
|
||||
)
|
||||
|
||||
func gtkBool(input bool) C.gboolean {
|
||||
@@ -90,6 +91,9 @@ func NewWindow(appoptions *options.App, debug bool, devtoolsEnabled bool) *Windo
|
||||
var webviewGpuPolicy int
|
||||
if appoptions.Linux != nil {
|
||||
webviewGpuPolicy = int(appoptions.Linux.WebviewGpuPolicy)
|
||||
} else {
|
||||
// workaround for https://github.com/wailsapp/wails/issues/2977
|
||||
webviewGpuPolicy = int(linux.WebviewGpuPolicyNever)
|
||||
}
|
||||
|
||||
webview := C.SetupWebview(
|
||||
|
||||
Reference in New Issue
Block a user