You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I integrated the notifyicon example into a complex app with many goroutines, and walk.NewMainWindow never returns the rest of my code (including walk.NewNotifyIcon) never executes:
I thought maybe this is because the main window wasn't being created from the main thread, but I tried to call runtime.LockOSThread() and it made no difference.
The text was updated successfully, but these errors were encountered:
I'm not sure what was causing this, but I moved the walk.NewMainWindow() call to be the first thing in my main() and now it works. I think perhaps one of my other dependencies was interacting with the windows api as well and conflicting somehow.
I figured out why this is happening.. one of my dependencies uses go-ole, which calls Lock/UnlockOSThread itself. This causes the main thread to get unlocked due to a golang bug.
I integrated the notifyicon example into a complex app with many goroutines, and
walk.NewMainWindow
never returns the rest of my code (includingwalk.NewNotifyIcon
) never executes:I thought maybe this is because the main window wasn't being created from the main thread, but I tried to call
runtime.LockOSThread()
and it made no difference.The text was updated successfully, but these errors were encountered: