mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-23 01:38:49 +00:00
Update: use one style name with mac api
This commit is contained in:
parent
18f032b809
commit
535fc8a2ae
1 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue