Index: D:/SourceForge/Lazarus/lcl/include/docktree.inc
===================================================================
--- D:/SourceForge/Lazarus/lcl/include/docktree.inc (revision 17889)
+++ D:/SourceForge/Lazarus/lcl/include/docktree.inc (working copy)
@@ -112,8 +112,33 @@
 
 procedure TDockTree.PositionDockRect(AClient, DropCtl: TControl;
   DropAlign: TAlign; var DockRect: TRect);
+var
+  dzone: TDockZone;
+  r: TRect;
 begin
-  // ToDo
+//determine drop zone
+  if DropCtl = nil then
+    dzone := RootZone
+  else
+    dzone := RootZone.FindZone(DropCtl);
+//get the zone extent.
+  r := dzone.FBounds; //todo: doesn't work
+//this works better, but doesn't include the zone header
+  //r := Rect(dzone.Left, dzone.Top, dzone.Width, dzone.Height);
+//shrink rect
+  case DropAlign of
+  alTop:    r.Bottom := r.Bottom div 2;
+  alBottom: begin r.Bottom := r.Bottom div 2; inc(r.Top, r.Bottom); end;
+  alLeft:   r.Right := r.Right div 2;
+  alRight:  begin r.Right := r.Right div 2; inc(r.Left, r.Right); end;
+  end;
+//client to screen
+  r.TopLeft := DockSite.ClientToScreen(r.TopLeft);
+//width/height to right/bottom
+  inc(r.Bottom, r.Top);
+  inc(r.Right, r.Left);
+//store result
+  DockRect := r;
 end;
 
 procedure TDockTree.RemoveControl(AControl: TControl);
