aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-04-03 02:14:55 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-03 02:14:55 +0200
commit2a45e8b603d3798a2b45dffe7d15b30b8aaf86a9 (patch)
treee06ba220f480ca8e74e8a826a88863b4ddde8540
parentifaceconfig: remove unused code (diff)
downloadwireguard-windows-2a45e8b603d3798a2b45dffe7d15b30b8aaf86a9.tar.xz
wireguard-windows-2a45e8b603d3798a2b45dffe7d15b30b8aaf86a9.zip
ui: lock to OS thread
We do this ourselves rather than having lxn/win do it for us. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--ui/ui.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/ui.go b/ui/ui.go
index f82864b0..d3bd7b54 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -14,6 +14,7 @@ import (
"golang.zx2c4.com/wireguard/windows/service"
"golang.zx2c4.com/wireguard/windows/ui/syntax"
"os"
+ "runtime"
"time"
)
@@ -48,6 +49,8 @@ func nag() {
}
func RunUI() {
+ runtime.LockOSThread()
+
icon, _ := walk.NewIconFromResourceId(1)
mw, _ := walk.NewMainWindowWithName("WireGuard")