code: public boolean shouldResetDrag(int button)
  	{
  		if (!isDraggingItemStack())
  			return false;
  
  		if (dragType == DRAG_TYPE_SPREAD)
  			return button == 1 && draggedSlots.size() > 1;
  		if (dragType == DRAG_TYPE_ONE)
  			return button == 0 && draggedSlots.size() > 1;
  
  		return dragType != DRAG_TYPE_PICKUP;
  	}
docs: Checks if the dragging should be reset based on the mouse button clicked.
  
  @param button the button
  @return true, if dragging should reset