From d9b331bdaef5414aa3ff368d25960b65a5d3abfc Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 29 Nov 2018 13:15:45 +0100 Subject: Add the separator to the visible items --- systray_windows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/systray_windows.go b/systray_windows.go index 9d560b7..9bbb3d1 100644 --- a/systray_windows.go +++ b/systray_windows.go @@ -508,9 +508,11 @@ func (t *winTray) addSeparatorMenuItem(menuId int32) error { mi.Size = uint32(unsafe.Sizeof(mi)) + t.addToVisibleItems(menuId) + position := t.getVisibleItemIndex(menuId) res, _, err := pInsertMenuItem.Call( uintptr(t.menu), - uintptr(menuId), + uintptr(position), 1, uintptr(unsafe.Pointer(&mi)), ) -- cgit v1.2.3