aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthistle2018-12-05 20:05:16 -0500
committerGitHub2018-12-05 20:05:16 -0500
commiteaad7114094d8a1b1b7188c062fa7f0fe21ac9b0 (patch)
treedf74abc434519e3fce2eae3de0bd4c57e49cd900
parent6fa49abe8bee085d84e1d5aae1104c1ec88a97db (diff)
parentd9b331bdaef5414aa3ff368d25960b65a5d3abfc (diff)
downloadsystray-eaad7114094d8a1b1b7188c062fa7f0fe21ac9b0.tar.bz2
Merge pull request #76 from meskio/separator_windows
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)),
)