Skip to content

Commit

Permalink
Create menu before calling onReady on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm authored and Crosse committed Feb 22, 2022
1 parent e849b2a commit 229901a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions systray_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,8 @@ func (t *winTray) wndProc(hWnd windows.Handle, message uint32, wParam, lParam ui
WM_ENDSESSION = 0x0016
WM_CLOSE = 0x0010
WM_DESTROY = 0x0002
WM_CREATE = 0x0001
)
switch message {
case WM_CREATE:
systrayReady()
case WM_COMMAND:
menuItemId := int32(wParam)
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-command#menus
Expand Down Expand Up @@ -778,6 +775,7 @@ func registerSystray() {
return
}

systrayReady()
}

func nativeLoop() {
Expand Down

0 comments on commit 229901a

Please sign in to comment.