Skip to content
Snippets Groups Projects
Unverified Commit 2445ac94 authored by meskio's avatar meskio :tent:
Browse files

[bug] wait until the systray is initalized to start the systray loop

- Resolves: #106
parent 00abe095
No related branches found
No related tags found
1 merge request!57[bug] wait until the systray is initalized to start the systray loop
......@@ -24,7 +24,7 @@ import (
)
func Run(conf *Config) {
bt := bmTray{conf: conf}
bt := bmTray{conf: conf, waitCh: make(chan bool)}
go initialize(conf, &bt)
bt.start()
}
......
......@@ -83,9 +83,13 @@ func (bt *bmTray) onReady() {
systray.AddSeparator()
bt.mQuit = systray.AddMenuItem(printer.Sprintf("Quit"), "")
bt.waitCh <- true
}
func (bt *bmTray) loop(bm bitmask.Bitmask, notify *notificator, as bitmask.Autostart) {
<-bt.waitCh
bt.waitCh = nil
bt.bm = bm
bt.notify = notify
bt.autostart = as
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment