mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-15 04:06:05 +02:00
+ allow disabling the Extended/SGH 1006 mouse tracking mode introduced in r29773
by setting the environment variable FPC_DISABLE_SGR_EXT_MODE_MOUSE=1 git-svn-id: trunk@29778 -
This commit is contained in:
parent
5946328ed6
commit
0c2054b9a3
@ -47,6 +47,7 @@ const
|
|||||||
WaitMouseMove : boolean = false;
|
WaitMouseMove : boolean = false;
|
||||||
PrintMouseCur : boolean = false;
|
PrintMouseCur : boolean = false;
|
||||||
mousecurofs : longint = -1;
|
mousecurofs : longint = -1;
|
||||||
|
DisableSGRExtModeMouse : boolean = false;
|
||||||
|
|
||||||
var
|
var
|
||||||
mousecurcell : TVideoCell;
|
mousecurcell : TVideoCell;
|
||||||
@ -197,6 +198,9 @@ var connect:TGPMConnect;
|
|||||||
{$endif ndef NOGPM}
|
{$endif ndef NOGPM}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
if fpGetEnv('FPC_DISABLE_SGR_EXT_MODE_MOUSE')='1' then
|
||||||
|
DisableSGRExtModeMouse:=true;
|
||||||
|
|
||||||
{ if gpm_fs<>-1 then
|
{ if gpm_fs<>-1 then
|
||||||
runerror(240);}
|
runerror(240);}
|
||||||
{Test wether to use X-terminals.}
|
{Test wether to use X-terminals.}
|
||||||
@ -207,14 +211,16 @@ begin
|
|||||||
gpm_fs:=-1000;
|
gpm_fs:=-1000;
|
||||||
{write(#27'[?1001s');} { save old hilit tracking }
|
{write(#27'[?1001s');} { save old hilit tracking }
|
||||||
write(#27'[?1000h'); { enable mouse tracking }
|
write(#27'[?1000h'); { enable mouse tracking }
|
||||||
write(#27'[?1006h'); { try to enable Extended/SGH 1006 mouse tracking }
|
if not DisableSGRExtModeMouse then
|
||||||
|
write(#27'[?1006h'); { try to enable Extended/SGH 1006 mouse tracking }
|
||||||
end;
|
end;
|
||||||
1003:
|
1003:
|
||||||
begin
|
begin
|
||||||
{Use the xterm mouse, report all mouse events.}
|
{Use the xterm mouse, report all mouse events.}
|
||||||
gpm_fs:=-1003;
|
gpm_fs:=-1003;
|
||||||
write(#27'[?1003h'); { enable mouse tracking }
|
write(#27'[?1003h'); { enable mouse tracking }
|
||||||
write(#27'[?1006h'); { try to enable Extended/SGH 1006 mouse tracking }
|
if not DisableSGRExtModeMouse then
|
||||||
|
write(#27'[?1006h'); { try to enable Extended/SGH 1006 mouse tracking }
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$ifndef NOGPM}
|
{$ifndef NOGPM}
|
||||||
@ -249,12 +255,14 @@ begin
|
|||||||
{xterm mouse}
|
{xterm mouse}
|
||||||
write(#27'[?1000l'); { disable mouse tracking }
|
write(#27'[?1000l'); { disable mouse tracking }
|
||||||
{write(#27'[?1001r');} { Restore old hilit tracking }
|
{write(#27'[?1001r');} { Restore old hilit tracking }
|
||||||
write(#27'[?1006l'); { disable Extended/SGH 1006 mouse tracking }
|
if not DisableSGRExtModeMouse then
|
||||||
|
write(#27'[?1006l'); { disable Extended/SGH 1006 mouse tracking }
|
||||||
end;
|
end;
|
||||||
-1003:
|
-1003:
|
||||||
begin
|
begin
|
||||||
write(#27'[?1003l'); { disable mouse tracking }
|
write(#27'[?1003l'); { disable mouse tracking }
|
||||||
write(#27'[?1006l'); { disable Extended/SGH 1006 mouse tracking }
|
if not DisableSGRExtModeMouse then
|
||||||
|
write(#27'[?1006l'); { disable Extended/SGH 1006 mouse tracking }
|
||||||
end;
|
end;
|
||||||
{$ifndef NOGPM}
|
{$ifndef NOGPM}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user