code: func DragBegin(xu *xgbutil.XUtil, ev xevent.ButtonPressEvent,
  	grabwin xproto.Window, win xproto.Window,
  	begin xgbutil.MouseDragBeginFun, step xgbutil.MouseDragFun,
  	end xgbutil.MouseDragFun) {
  
  	// don't start a drag if one is already in progress
  	if mouseDrag(xu) {
  		return
  	}
  
  	// Run begin first. It may tell us to cancel the grab.
  	// It can also tell us which cursor to use when grabbing.
  	grab, cursor := begin(xu, int(ev.RootX), int(ev.RootY),
  		int(ev.EventX), int(ev.EventY))
  
  	// if we couldn't establish a grab, quit
  	// Or quit if 'begin' tells us to.
  	if !grab || !dragGrab(xu, grabwin, win, cursor) {
  		return
  	}
  
  	// we're committed. set the drag state and start the 'begin' function
  	mouseDragStepSet(xu, step)
  	mouseDragEndSet(xu, end)
  }
docs: // DragBegin executes the "begin" function registered for the current drag.
  // It also initiates the grab with the cursor id return by the begin callback.
  //
  // N.B. This function is automatically called in the Drag convenience function.
  // This should be used when the drag can be started from a source other than
  // a button press handled by the WM. If you use this function, then there
  // should also be a call to DragEnd when the drag is done. (This is
  // automatically done for you if you use Drag.)