[v3 linux] systray implementation

Linux requires a `gtk_menu_bar` for a gtk_window to display a menu.
For the `systray` a `gtk_menu` is needed instead.
This change creates the correct type of `impl` for the `Menu`
depending on how it is being used.
This commit is contained in:
Travis McLane
2023-09-28 14:50:38 -05:00
parent 71fc222059
commit efa67cb01c
6 changed files with 39 additions and 29 deletions
+8
View File
@@ -8,6 +8,14 @@ type linuxMenu struct {
}
func newMenuImpl(menu *Menu) *linuxMenu {
result := &linuxMenu{
menu: menu,
native: menuNew(),
}
return result
}
func newMenuBarImpl(menu *Menu) *linuxMenu {
result := &linuxMenu{
menu: menu,
native: menuBarNew(),