code: func GetXidFromPid(xu *xgbutil.XUtil, pid int32) (xproto.Window, error) {
  	windows, err := ewmh.ClientListGet(xu)
  	if err != nil {
  		return 0, err
  	}
  
  	for _, window := range windows {
  		wmPid, err := ewmh.WmPidGet(xu, window)
  		if err != nil {
  			return 0, err
  		}
  
  		if uint(pid) == wmPid {
  			return window, nil
  		}
  	}
  
  	return 0, errors.New("failed to find a window with a matching pid.")
  }
docs: // GetXidFromPid get the xide from pid