LCL: TWinControl.IsControlMouseMsg checking for wincontrol childs - in case they overlap

git-svn-id: trunk@12704 -
This commit is contained in:
mattias 2007-11-02 20:21:39 +00:00
parent 4e7dadcd8b
commit 985c21b33b

View File

@ -4040,9 +4040,9 @@ begin
end;
end;
{------------------------------------------------------------------------------}
{ TWinControl IsControlMouseMsg }
{------------------------------------------------------------------------------}
{------------------------------------------------------------------------------
TWinControl IsControlMouseMsg
------------------------------------------------------------------------------}
function TWinControl.IsControlMouseMsg(var TheMessage: TLMMouse) : Boolean;
var
Control : TControl;
@ -4060,8 +4060,9 @@ begin
then Control := CaptureControl;
end
else begin
// do not query wincontrol childs, because they get their own messages
Control := ControlAtPos(SmallPointToPoint(TheMessage.Pos),[]);
// do query wincontrol childs, in case they overlap
Control := ControlAtPos(SmallPointToPoint(TheMessage.Pos),
[capfAllowWinControls]);
end;
//DebugLn('TWinControl.IsControlMouseMsg B ',DbgSName(Self),' Control=',DbgSName(Control));