From 364f192178506e26b9e39131b44e0b3c6b4f4a70 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Fri, 8 Feb 2019 08:45:36 -0400 Subject: [PATCH] update code style and godoc --- robotgo_unix.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/robotgo_unix.go b/robotgo_unix.go index eadd56f..b1e6d62 100644 --- a/robotgo_unix.go +++ b/robotgo_unix.go @@ -96,7 +96,7 @@ func ActivePID(pid int32, args ...int) error { return nil } -// GetXId get the xid +// GetXId get the xid return window and error func GetXId(xu *xgbutil.XUtil, pid int32) (xproto.Window, error) { if xu == nil { var err error @@ -123,6 +123,7 @@ func GetXidFromPid(xu *xgbutil.XUtil, pid int32) (xproto.Window, error) { if err != nil { return 0, err } + if uint(pid) == wmPid { return window, nil }