code: func GrabPointer(xu *xgbutil.XUtil, win xproto.Window, confine xproto.Window,
  	cursor xproto.Cursor) (bool, error) {
  
  	reply, err := xproto.GrabPointer(xu.Conn(), false, win, pointerMasks,
  		xproto.GrabModeAsync, xproto.GrabModeAsync,
  		confine, cursor, 0).Reply()
  	if err != nil {
  		return false, fmt.Errorf("GrabPointer: Error grabbing pointer on "+
  			"window '%x': %s", win, err)
  	}
  
  	return reply.Status == xproto.GrabStatusSuccess, nil
  }
docs: // GrabPointer grabs the entire pointer.
  // Returns whether GrabStatus is successful and an error if one is reported by
  // XGB. It is possible to not get an error and the grab to be unsuccessful.
  // The purpose of 'win' is that after a grab is successful, ALL Button*Events
  // will be sent to that window. Make sure you have a callback attached :-)