Clarify null-HWND doc note in ForegroundWindow
This commit is contained in:
@@ -17,7 +17,8 @@ var (
|
|||||||
// ForegroundWindow returns the current foreground window's handle (as a uintptr
|
// ForegroundWindow returns the current foreground window's handle (as a uintptr
|
||||||
// so platform-neutral callers need not import windows), its title, and its
|
// so platform-neutral callers need not import windows), its title, and its
|
||||||
// on-task class (process exe base name; see ClassFromImagePath). ok is false
|
// on-task class (process exe base name; see ClassFromImagePath). ok is false
|
||||||
// when there is no foreground window (e.g. secure desktop / lock screen).
|
// when GetForegroundWindow returns null, which happens transiently during focus
|
||||||
|
// changes and some secure-desktop transitions (UAC / lock screen).
|
||||||
func ForegroundWindow() (hwnd uintptr, title, class string, ok bool) {
|
func ForegroundWindow() (hwnd uintptr, title, class string, ok bool) {
|
||||||
h := windows.GetForegroundWindow()
|
h := windows.GetForegroundWindow()
|
||||||
if h == 0 {
|
if h == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user