aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-12 15:16:01 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-13 13:28:00 +0200
commitd69518305d0a2365a3a6e525145759a4e79c508d (patch)
treea9afc7ce88c727e8f66662b1611bb6665a8b91a8 /ui
parentui: do not overlay gray dot on icon (diff)
downloadwireguard-windows-d69518305d0a2365a3a6e525145759a4e79c508d.tar.xz
wireguard-windows-d69518305d0a2365a3a6e525145759a4e79c508d.zip
ui: lock runtime thread as early as possible
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 70cd72c1..4ee684bc 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -9,6 +9,7 @@ import (
"fmt"
"github.com/lxn/walk"
"golang.zx2c4.com/wireguard/windows/service"
+ "runtime"
"runtime/debug"
"time"
)
@@ -17,6 +18,7 @@ var shouldQuitManagerWhenExiting = false
var startTime = time.Now()
func RunUI() {
+ runtime.LockOSThread()
defer func() {
if err := recover(); err != nil {
walk.MsgBox(nil, "Panic", fmt.Sprint(err, "\n\n", string(debug.Stack())), walk.MsgBoxIconError)