From 2d5db901618f4f9419dc5fbc0d04439808714a0f Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 26 Feb 2021 20:52:03 -0800 Subject: [PATCH] util/winutil: make it actually compile Helps to use the right GOOS after refactoring, sigh. Signed-off-by: Brad Fitzpatrick --- util/winutil/winutil.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/winutil/winutil.go b/util/winutil/winutil.go index cf6abb450..de53d854b 100644 --- a/util/winutil/winutil.go +++ b/util/winutil/winutil.go @@ -7,6 +7,10 @@ // Package winuntil contains misc Windows/win32 helper functions. package winutil +import ( + "golang.org/x/sys/windows" +) + // GetDesktopPID searches the PID of the process that's running the // currently active desktop and whether it was found. // Usually the PID will be for explorer.exe. @@ -15,7 +19,6 @@ func GetDesktopPID() (pid uint32, ok bool) { if hwnd == 0 { return 0, false } - var pid uint32 windows.GetWindowThreadProcessId(hwnd, &pid) return pid, pid != 0 }