mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 01:59:12 +02:00
gtk2: test mouse multiclicks also to component sender. Solves also issue #29314
git-svn-id: trunk@51176 -
This commit is contained in:
parent
57d803fc79
commit
c871f99df2
@ -2039,6 +2039,11 @@ var
|
|||||||
Result:=(LastMouse.Window<>nil) and (LastMouse.Window=Event^.Window);
|
Result:=(LastMouse.Window<>nil) and (LastMouse.Window=Event^.Window);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function LastClickInSameComponent: boolean;
|
||||||
|
begin
|
||||||
|
Result:=(LastMouse.Component<>nil) and (LastMouse.Component=AWinControl);
|
||||||
|
end;
|
||||||
|
|
||||||
function LastClickAtSamePosition: boolean;
|
function LastClickAtSamePosition: boolean;
|
||||||
begin
|
begin
|
||||||
Result:= (Abs(EventXY.X-LastMouse.WindowPoint.X)<=DblClickThreshold)
|
Result:= (Abs(EventXY.X-LastMouse.WindowPoint.X)<=DblClickThreshold)
|
||||||
@ -2053,6 +2058,7 @@ var
|
|||||||
function TestIfMultiClick: boolean;
|
function TestIfMultiClick: boolean;
|
||||||
begin
|
begin
|
||||||
Result:=LastClickInSameGdkWindow
|
Result:=LastClickInSameGdkWindow
|
||||||
|
and LastClickInSameComponent
|
||||||
and LastClickAtSamePosition
|
and LastClickAtSamePosition
|
||||||
and LastClickInTime;
|
and LastClickInTime;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user