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:
juha 2011-07-18 15:15:11 +00:00
parent 00f5677d94
commit c48e840412
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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