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