mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-22 17:01:43 +00:00
util/winutil: make it actually compile
Helps to use the right GOOS after refactoring, sigh. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
e98cdbb8b6
commit
2d5db90161
@ -7,6 +7,10 @@
|
|||||||
// Package winuntil contains misc Windows/win32 helper functions.
|
// Package winuntil contains misc Windows/win32 helper functions.
|
||||||
package winutil
|
package winutil
|
||||||
|
|
||||||
|
import (
|
||||||
|
"golang.org/x/sys/windows"
|
||||||
|
)
|
||||||
|
|
||||||
// GetDesktopPID searches the PID of the process that's running the
|
// GetDesktopPID searches the PID of the process that's running the
|
||||||
// currently active desktop and whether it was found.
|
// currently active desktop and whether it was found.
|
||||||
// Usually the PID will be for explorer.exe.
|
// Usually the PID will be for explorer.exe.
|
||||||
@ -15,7 +19,6 @@ func GetDesktopPID() (pid uint32, ok bool) {
|
|||||||
if hwnd == 0 {
|
if hwnd == 0 {
|
||||||
return 0, false
|
return 0, false
|
||||||
}
|
}
|
||||||
var pid uint32
|
|
||||||
windows.GetWindowThreadProcessId(hwnd, &pid)
|
windows.GetWindowThreadProcessId(hwnd, &pid)
|
||||||
return pid, pid != 0
|
return pid, pid != 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user