+ fix for bug report 1953 adapted from S Wiktor

This commit is contained in:
pierre 2002-05-16 20:21:50 +00:00
parent fbf499b13d
commit 3336ceac53
2 changed files with 32 additions and 20 deletions

View File

@ -1146,20 +1146,14 @@ begin
DownWhere.Y:=MouseWhere.Y; DownWhere.Y:=MouseWhere.Y;
DownTicks:=GetDosTicks; DownTicks:=GetDosTicks;
AutoTicks:=GetDosTicks; AutoTicks:=GetDosTicks;
if AutoTicks=0 then
AutoTicks:=1;
AutoDelay:=RepeatDelay; AutoDelay:=RepeatDelay;
end; end;
MouseActionUp : MouseActionUp :
begin begin
Event.What:=evMouseUp; Event.What:=evMouseUp;
end; AutoTicks:=0;
else
begin
if GetDosTicks-AutoTicks>=AutoDelay then
begin
Event.What:=evMouseAuto;
AutoTicks:=GetDosTicks;
AutoDelay:=1;
end;
end; end;
end; end;
Event.Buttons:=e.Buttons; Event.Buttons:=e.Buttons;
@ -1169,6 +1163,15 @@ begin
LastWhere.x:=Event.Where.x; LastWhere.x:=Event.Where.x;
LastWhere.y:=Event.Where.y; LastWhere.y:=Event.Where.y;
end end
else if (AutoTicks <> 0) and (GetDosTicks >= AutoTicks + AutoDelay) then
begin
Event.What:=evMouseAuto;
Event.Buttons:=LastButtons;
Event.Where.X:=LastWhere.x;
Event.Where.Y:=LastWhere.y;
AutoTicks:=GetDosTicks;
AutoDelay:=1;
end
else else
FillChar(Event,sizeof(TEvent),0); FillChar(Event,sizeof(TEvent),0);
end; end;
@ -1486,7 +1489,10 @@ BEGIN
END. END.
{ {
$Log$ $Log$
Revision 1.13 2001-10-02 16:35:50 pierre Revision 1.14 2002-05-16 20:21:50 pierre
+ fix for bug report 1953 adapted from S Wiktor
Revision 1.13 2001/10/02 16:35:50 pierre
* fix several problems, try to get the graph version to compile * fix several problems, try to get the graph version to compile
Revision 1.12 2001/08/05 02:03:13 peter Revision 1.12 2001/08/05 02:03:13 peter

View File

@ -1146,20 +1146,14 @@ begin
DownWhere.Y:=MouseWhere.Y; DownWhere.Y:=MouseWhere.Y;
DownTicks:=GetDosTicks; DownTicks:=GetDosTicks;
AutoTicks:=GetDosTicks; AutoTicks:=GetDosTicks;
if AutoTicks=0 then
AutoTicks:=1;
AutoDelay:=RepeatDelay; AutoDelay:=RepeatDelay;
end; end;
MouseActionUp : MouseActionUp :
begin begin
Event.What:=evMouseUp; Event.What:=evMouseUp;
end; AutoTicks:=0;
else
begin
if GetDosTicks-AutoTicks>=AutoDelay then
begin
Event.What:=evMouseAuto;
AutoTicks:=GetDosTicks;
AutoDelay:=1;
end;
end; end;
end; end;
Event.Buttons:=e.Buttons; Event.Buttons:=e.Buttons;
@ -1169,6 +1163,15 @@ begin
LastWhere.x:=Event.Where.x; LastWhere.x:=Event.Where.x;
LastWhere.y:=Event.Where.y; LastWhere.y:=Event.Where.y;
end end
else if (AutoTicks <> 0) and (GetDosTicks >= AutoTicks + AutoDelay) then
begin
Event.What:=evMouseAuto;
Event.Buttons:=LastButtons;
Event.Where.X:=LastWhere.x;
Event.Where.Y:=LastWhere.y;
AutoTicks:=GetDosTicks;
AutoDelay:=1;
end
else else
FillChar(Event,sizeof(TEvent),0); FillChar(Event,sizeof(TEvent),0);
end; end;
@ -1486,7 +1489,10 @@ BEGIN
END. END.
{ {
$Log$ $Log$
Revision 1.13 2001-10-02 16:35:50 pierre Revision 1.14 2002-05-16 20:21:50 pierre
+ fix for bug report 1953 adapted from S Wiktor
Revision 1.13 2001/10/02 16:35:50 pierre
* fix several problems, try to get the graph version to compile * fix several problems, try to get the graph version to compile
Revision 1.12 2001/08/05 02:03:13 peter Revision 1.12 2001/08/05 02:03:13 peter