From 535fc8a2ae543c3ea70dfad6eb4bea5d31485fd5 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sat, 29 Nov 2025 08:51:08 -0800 Subject: [PATCH] Update: use one style name with mac api --- robotgo_x11.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/robotgo_x11.go b/robotgo_x11.go index 51464be..282530e 100644 --- a/robotgo_x11.go +++ b/robotgo_x11.go @@ -121,7 +121,7 @@ func ActivePid(pid int, args ...int) error { } // get the xid from pid - xid, err := GetXidFromPid(xu, pid) + xid, err := GetXidByPid(xu, pid) if err != nil { return err } @@ -145,12 +145,19 @@ func GetXid(xu *xgbutil.XUtil, pid int) (xproto.Window, error) { } } - xid, err := GetXidFromPid(xu, pid) + xid, err := GetXidByPid(xu, pid) return xid, err } +// Deprecated: use the GetXidByPid(), +// // GetXidFromPid get the xid from pid func GetXidFromPid(xu *xgbutil.XUtil, pid int) (xproto.Window, error) { + return GetXidByPid(xu, pid) +} + +// GetXidByPid get the xid from pid +func GetXidByPid(xu *xgbutil.XUtil, pid int) (xproto.Window, error) { windows, err := ewmh.ClientListGet(xu) if err != nil { return 0, err