anchor.diff:        Result := ARoot;
         exit;
       end;
  -//     writeln('Query Tree');
  -    if XQueryTree(xapplication.Display, ARoot, @r, @p, @children, @numch) <> 0 then
  +    if XQueryTree(xapplication.Display, ARoot, @r, @p, @children, @numchildren) <> 0 then
       begin
  -      if (numch > 0) and (children <> nil) then
  +      if (numchildren > 0) then
         begin
           r := None;
           { upon return from XQueryTree, children are listed in the current
             stacking order, from bottom-most (first) to top-most (last) }
  -        for i := numch-1 downto 0 do
  +        for i := numchildren-1 downto 0 do
           begin
             r := FindWindow(children^[i], x - wattr.x, y - wattr.y);
             if r <> None then
  
positive.code:   count, remaining: culong;
    data: pchar = nil;
  begin
  //  writeln('IsTopLevel ');
    XGetWindowProperty(xapplication.Display, AWin, xapplication.xia_wm_state, 0, 0,
        TBool(False), AnyPropertyType, @actualtype, @actualformat, @count,
        @remaining, @data);
  
negative.code:   {$IFDEF DNDDEBUG}
    writeln('XdndDrop event received!');
    {$ENDIF}
    { TODO: Must XConvertSelection always be called? }
    XConvertSelection(FDisplay, XdndSelection, FDNDDataType, XdndSelection, ATopLevelWindow.FWinHandle, ATimestamp);
  
    { send message to confirm drop will be accepted in specified rectangle }
  