summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-06-19 17:42:06 +0200
committerRuben Pollan <meskio@sindominio.net>2018-06-19 17:42:06 +0200
commit6aa6b0cd01212a1317b87b9b7d8db60fa787de8c (patch)
treee28399efcc2638f75123692f23418d086820f161
parent63aab32a7525677dda8ea553c1b71b75d15b4eeb (diff)
[bug] lock main goroutine into OS thread
- Resolves: #52
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index ddea432..5c8c74c 100644
--- a/main.go
+++ b/main.go
@@ -20,6 +20,7 @@ import (
"fmt"
"log"
"os"
+ "runtime"
"0xacab.org/leap/bitmask-systray/bitmask"
"github.com/jmshal/go-locale"
@@ -35,6 +36,10 @@ var version string
var printer *message.Printer
func main() {
+ // on OSX sometimes the systray doesn't work (bitmask-systray#52)
+ // locking the main thread into an OS thread fixes the problem
+ runtime.LockOSThread()
+
versionFlag := flag.Bool("version", false, "Version of the bitmask-systray")
flag.Parse()
if *versionFlag {