mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 10:35:58 +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);
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user