5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 04:30:55 +08:00

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.
This commit is contained in:
Lea Anthony 2024-02-05 21:37:35 +11:00 committed by Travis McLane
parent 84e1bb4d9b
commit adae39efee

View File

@ -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 {