mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-13 12:46:00 +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;
|
||||
PrintMouseCur : boolean = false;
|
||||
mousecurofs : longint = -1;
|
||||
DisableSGRExtModeMouse : boolean = false;
|
||||
|
||||
var
|
||||
mousecurcell : TVideoCell;
|
||||
@ -197,6 +198,9 @@ var connect:TGPMConnect;
|
||||
{$endif ndef NOGPM}
|
||||
|
||||
begin
|
||||
if fpGetEnv('FPC_DISABLE_SGR_EXT_MODE_MOUSE')='1' then
|
||||
DisableSGRExtModeMouse:=true;
|
||||
|
||||
{ if gpm_fs<>-1 then
|
||||
runerror(240);}
|
||||
{Test wether to use X-terminals.}
|
||||
@ -207,14 +211,16 @@ begin
|
||||
gpm_fs:=-1000;
|
||||
{write(#27'[?1001s');} { save old hilit 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;
|
||||
1003:
|
||||
begin
|
||||
{Use the xterm mouse, report all mouse events.}
|
||||
gpm_fs:=-1003;
|
||||
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;
|
||||
{$ifndef NOGPM}
|
||||
@ -249,12 +255,14 @@ begin
|
||||
{xterm mouse}
|
||||
write(#27'[?1000l'); { disable mouse 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;
|
||||
-1003:
|
||||
begin
|
||||
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;
|
||||
{$ifndef NOGPM}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user