* Comment to document libgpm/xterm mouse mess.

git-svn-id: trunk@6083 -
This commit is contained in:
daniel 2007-01-19 22:26:58 +00:00
parent ac23d1ea3c
commit 5f1f8936e5

View File

@ -127,6 +127,16 @@ begin
Updatescreen(false);
end;
{Note: libgpm will initialize an xterm mouse if TERM=xterm.
However, this check sucks, because xterm is not the only terminal
with mouse. To make it worse, it assumes gpm should be used on
anything not xterm, while in reality only the Linux console has gpm.
Some distributions use a patched libgpm to work around this, but
to avoid this mess, we detect the xterm mouse ourselves (we need to
be able to do this anyway for the NOGPM case), and don't do any libgpm
call at all if an xterm mouse is detected.}
function detect_xterm_mouse:boolean;
const mouse_terminals:array[0..6] of string[7]=('cons','eterm','gnome',
@ -167,6 +177,7 @@ begin
begin
{Use the gpm mouse.}
{ open gpm }
connect.EventMask:=GPM_MOVE or GPM_DRAG or GPM_DOWN or GPM_UP;
connect.DefaultMask:=0;