mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 09:20:56 +02:00
LCL, GTK2: Fix double click behavior when handler takes more than 250 milliseconds. Patche from Max Vlasov, issues #14001 and #19753
git-svn-id: trunk@31737 -
This commit is contained in:
parent
00f5677d94
commit
c48e840412
@ -1657,7 +1657,7 @@ var
|
||||
|
||||
function LastClickInTime: boolean;
|
||||
begin
|
||||
Result := ((now - LastMouse.TheTime) <= ((1/86400)*(DblClickTime/1000)));
|
||||
Result:=(event^.time - LastMouse.eventTime) <= DblClickTime;
|
||||
end;
|
||||
|
||||
function TestIfMultiClick: boolean;
|
||||
@ -1732,7 +1732,7 @@ var
|
||||
DebugLn(' ClickCount=',dbgs(LastMouse.ClickCount));
|
||||
{$ENDIF}
|
||||
|
||||
LastMouse.TheTime := Now;
|
||||
LastMouse.eventTime := event^.time;
|
||||
LastMouse.Window := Event^.Window;
|
||||
LastMouse.WindowPoint := EventXY;
|
||||
LastMouse.Down := True;
|
||||
|
@ -75,7 +75,7 @@ const
|
||||
type
|
||||
TLastMouseClick = record
|
||||
Down: boolean;
|
||||
TheTime: TDateTime; // last Down time
|
||||
eventTime: guint32; // last Down time
|
||||
ClickCount: integer;
|
||||
Component: TComponent;
|
||||
Window: PGdkWindow;
|
||||
@ -84,7 +84,7 @@ type
|
||||
|
||||
const
|
||||
EmptyLastMouseClick: TLastMouseClick =
|
||||
(Down: false; TheTime: -1; ClickCount: 0; Component: nil;
|
||||
(Down: false; eventTime: 0; ClickCount: 0; Component: nil;
|
||||
Window: nil; WindowPoint: (X: 0; Y: 0));
|
||||
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user