Add menu option for Linux

This commit is contained in:
Lea Anthony 2025-02-03 20:33:59 +11:00
commit 2db902ef82
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405
2 changed files with 4 additions and 3 deletions

View file

@ -28,7 +28,6 @@ type linuxWebviewWindow struct {
parent *WebviewWindow
menubar pointer
vbox pointer
menu *Menu
accels pointer
lastWidth int
lastHeight int
@ -261,12 +260,11 @@ func (w *linuxWebviewWindow) run() {
app := getNativeApplication()
var menu = w.menu
var menu = w.parent.options.Linux.Menu
if menu != nil {
InvokeSync(func() {
menu.Update()
})
w.menu = menu
w.gtkmenu = (menu.impl).(*linuxMenu).native
}

View file

@ -530,4 +530,7 @@ type LinuxWindow struct {
// WindowDidMoveDebounceMS is the debounce time in milliseconds for the WindowDidMove event
WindowDidMoveDebounceMS uint16
// Menu is the window's menu
Menu *Menu
}