Browse Source

* Comment to document libgpm/xterm mouse mess.

git-svn-id: trunk@6083 -
daniel 18 years ago
parent
commit
5f1f8936e5
1 changed files with 11 additions and 0 deletions
  1. 11 0
      rtl/unix/mouse.pp

+ 11 - 0
rtl/unix/mouse.pp

@@ -127,6 +127,16 @@ begin
    Updatescreen(false);
    Updatescreen(false);
 end;
 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;
 function detect_xterm_mouse:boolean;
 
 
 const mouse_terminals:array[0..6] of string[7]=('cons','eterm','gnome',
 const mouse_terminals:array[0..6] of string[7]=('cons','eterm','gnome',
@@ -167,6 +177,7 @@ begin
     begin
     begin
       {Use the gpm mouse.}
       {Use the gpm mouse.}
 
 
+
       { open gpm }
       { open gpm }
       connect.EventMask:=GPM_MOVE or GPM_DRAG or GPM_DOWN or GPM_UP;
       connect.EventMask:=GPM_MOVE or GPM_DRAG or GPM_DOWN or GPM_UP;
       connect.DefaultMask:=0;
       connect.DefaultMask:=0;