From d9f52789e209faa89b8878ccea5db3d5c48006f7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 12 May 2019 12:36:29 +0200 Subject: ui: unlock thread after raising Signed-off-by: Jason A. Donenfeld --- ui/raise.go | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') 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)) -- cgit v1.2.3-59-g8ed1b