Skip to content

Commit b717516

Browse files
committed
solve tray buttons only clickable once
1 parent 1bbd7da commit b717516

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

trayicon.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,19 @@ func setupSysTrayReal() {
8888
// }()
8989

9090
go func() {
91-
<-mDebug.ClickedCh
92-
open.Run("http://localhost:8989")
93-
logAction("log on")
91+
for {
92+
<-mDebug.ClickedCh
93+
logAction("log on")
94+
open.Start("http://localhost:8989")
95+
}
9496
}()
9597

9698
// We can manipulate the systray in other goroutines
9799
go func() {
98-
<-mUrl.ClickedCh
99-
open.Run("http://create-staging.arduino.cc")
100+
for {
101+
<-mUrl.ClickedCh
102+
open.Start("http://create-staging.arduino.cc")
103+
}
100104
}()
101105
}
102106

0 commit comments

Comments
 (0)