aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuben Pollan2018-11-29 13:15:45 +0100
committerRuben Pollan2018-11-29 13:15:45 +0100
commitd9b331bdaef5414aa3ff368d25960b65a5d3abfc (patch)
treedf74abc434519e3fce2eae3de0bd4c57e49cd900
parent6fa49abe8bee085d84e1d5aae1104c1ec88a97db (diff)
downloadsystray-d9b331bdaef5414aa3ff368d25960b65a5d3abfc.tar.bz2
Add the separator to the visible items
-rw-r--r--systray_windows.go4
1 files changed, 3 insertions, 1 deletions
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)),
)