summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/systray/run.go2
-rw-r--r--pkg/systray/systray.go4
2 files changed, 5 insertions, 1 deletions
diff --git a/pkg/systray/run.go b/pkg/systray/run.go
index 8877d64..2a513d8 100644
--- a/pkg/systray/run.go
+++ b/pkg/systray/run.go
@@ -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()
}
diff --git a/pkg/systray/systray.go b/pkg/systray/systray.go
index 11ed8c3..d95d3dc 100644
--- a/pkg/systray/systray.go
+++ b/pkg/systray/systray.go
@@ -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