diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-12 12:36:29 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-12 12:36:29 +0200 |
commit | d8b4d5aa17f3bf3cc6c3559a39c183b4d841e86c (patch) | |
tree | 095c9a1db32ba104dd45f482fa9003f629dd6286 /ui/raise.go | |
parent | ui: leave it to walk to lock thread (diff) | |
download | wireguard-windows-d8b4d5aa17f3bf3cc6c3559a39c183b4d841e86c.tar.xz wireguard-windows-d8b4d5aa17f3bf3cc6c3559a39c183b4d841e86c.zip |
ui: unlock thread after raising
Diffstat (limited to '')
-rw-r--r-- | ui/raise.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/raise.go b/ui/raise.go index 9a2794d1..7bc916a3 100644 --- a/ui/raise.go +++ b/ui/raise.go @@ -39,6 +39,7 @@ func RaiseUI() bool { func WaitForRaiseUIThenQuit() { var handle win.HWINEVENTHOOK runtime.LockOSThread() + defer runtime.UnlockOSThread() handle, err := win.SetWinEventHook(win.EVENT_OBJECT_CREATE, win.EVENT_OBJECT_CREATE, 0, func(hWinEventHook win.HWINEVENTHOOK, event uint32, hwnd win.HWND, idObject int32, idChild int32, idEventThread uint32, dwmsEventTime uint32) uintptr { class := make([]uint16, len(manageWindowWindowClass)+2) /* Plus 2, one for the null terminator, and one to see if this is only a prefix */ n, err := win.GetClassName(hwnd, &class[0], len(class)) |