gtk2: test mouse multiclicks also to component sender. Solves also issue #29314

git-svn-id: trunk@51176 -
This commit is contained in:
ondrej 2016-01-03 22:47:13 +00:00
parent 57d803fc79
commit c871f99df2

View File

@ -2039,6 +2039,11 @@ var
Result:=(LastMouse.Window<>nil) and (LastMouse.Window=Event^.Window);
end;
function LastClickInSameComponent: boolean;
begin
Result:=(LastMouse.Component<>nil) and (LastMouse.Component=AWinControl);
end;
function LastClickAtSamePosition: boolean;
begin
Result:= (Abs(EventXY.X-LastMouse.WindowPoint.X)<=DblClickThreshold)
@ -2053,6 +2058,7 @@ var
function TestIfMultiClick: boolean;
begin
Result:=LastClickInSameGdkWindow
and LastClickInSameComponent
and LastClickAtSamePosition
and LastClickInTime;
end;