mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:06:18 +02:00
+ fix for bug report 1953 adapted from S Wiktor
This commit is contained in:
parent
fbf499b13d
commit
3336ceac53
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user