From adae39efee08cd46f4ff079f4948c19c7ccaf29e Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 5 Feb 2024 21:37:35 +1100 Subject: [PATCH] Add webview GPU policy and update Linux options The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability. --- v3/pkg/application/webview_window_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/pkg/application/webview_window_linux.go b/v3/pkg/application/webview_window_linux.go index b9ba7d414..d990316d5 100644 --- a/v3/pkg/application/webview_window_linux.go +++ b/v3/pkg/application/webview_window_linux.go @@ -237,7 +237,7 @@ func (w *linuxWebviewWindow) run() { w.gtkmenu = (menu.impl).(*linuxMenu).native } - w.window, w.webview, w.vbox = windowNew(app.application, w.gtkmenu, w.parent.id, w.parent.options.Linux.WebviewGpuPolicy) + w.window, w.webview, w.vbox = windowNew(app.application, menu, w.parent.id, w.parent.options.Linux.WebviewGpuPolicy) app.registerWindow(w.window, w.parent.id) // record our mapping w.connectSignals() if w.parent.options.EnableDragAndDrop {