lcl: initialize all points of FDockRect on drag-dock start (issue #0015040)

git-svn-id: trunk@22688 -
This commit is contained in:
paul 2009-11-20 08:03:42 +00:00
parent eb5ca6d8d6
commit 28dc4adab4

View File

@ -122,7 +122,12 @@ begin
DragPos := APosition; //should have been done before
Control.CalculateDockSizes;
// mouse click offset from control TopLeft in screen coordinates
FDockRect.TopLeft := Control.ClientToScreen(Point(0, 0));
with FDockRect do
begin
TopLeft := Control.ClientToScreen(Point(0, 0));
Right := Left + Control.Width;
Bottom := Top + Control.Height;
end;
if Control.Width > 0 then
FDockOffset.x := Round((APosition.x - FDockRect.Left) / Control.Width * Control.UndockWidth)
else