summaryrefslogtreecommitdiff
path: root/pkg/systray/systray.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2019-01-24 19:37:46 +0100
committerRuben Pollan <meskio@sindominio.net>2019-01-24 19:37:46 +0100
commit2445ac94205c93187f4f8d1c3901d7f84e212dfb (patch)
tree6d31ee0d5c70ccb203f69339ceda953301e21aa2 /pkg/systray/systray.go
parent00abe09552c9c980d22ca1ee1a0511c9c8aa76e1 (diff)
[bug] wait until the systray is initalized to start the systray loop
- Resolves: #106
Diffstat (limited to 'pkg/systray/systray.go')
-rw-r--r--pkg/systray/systray.go4
1 files changed, 4 insertions, 0 deletions
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