anchor.diff:  begin
     { free old array }
     SetLength(FMimeTypesArray, 0);
  -  { set size of new array }
  -  SetLength(FMimeTypesArray, FMimedata.FormatCount);
  +  { set size of new array. Extra element for the terminating x.None value }
  +  SetLength(FMimeTypesArray, FMimedata.FormatCount+1);
   
     sl := FMimeData.Formats as TStringList;
     try
  
positive.code:     i := 0;
    xev.xclient.data.l[1] := i or (FUseVersion shl 24);
  
    InitializeMimeTypesToAtoms;
    { TODO: currently we limit ourselves to 3 mime types max. Fix this later }
    for i := 0 to 2 do
    begin
      if i < n then
        xev.xclient.data.l[2+i] := FMimeTypesArray[i]
      else
        xev.xclient.data.l[2+i] := x.None;
    end;
  
    XSendEvent(xapplication.Display, ATarget, False, NoEventMask, @xev);
  
negative.code:       a := XInternAtom(xapplication.Display, s, TBool(False));
        FMimeTypesArray[i] := a;
      end;
      FMimeTypesArray[i+1] := x.None; // termination value
    finally
      sl.Free;
    end;
  