[gpm][PATCH] selection fix

Andreas Mohr andi@rhlx01.fht-esslingen.de
Sun, 16 Mar 2003 17:56:57 +0100


Hi all,

When choosing the selection, we really don't want to do a "line select"
in vertical border cases, since noticing the exact cursor position
at the border is very difficult. Such behaviour is highly annoying ("skippy")
and UNWANTED: commented out relevant parts.
(besides, X11 doesn't do it that way either!)

We could choose to add a configuration option for that behaviour,
but given that X11 doesn't do it that way (or is it even configurable there?),
I don't think it's worth it.

Also, some spelling fixes.

Greetings,

Andreas Mohr


Index: README
===================================================================
RCS file: /data/cvs/gpm/README,v
retrieving revision 1.6
diff -u -r1.6 README
--- README	24 Dec 2002 23:24:47 -0000	1.6
+++ README	16 Mar 2003 16:56:54 -0000
@@ -31,7 +31,7 @@
 =========== MAINTENANCE
 
 As of 1.19.4, gpm is officially maintained again. Most of the README is written
-by Alessandro Rubine, only minor changes are made by me.
+by Alessandro Rubini, only minor changes are made by me.
 
 =========== MAILING LIST
 
@@ -128,7 +128,7 @@
 	msc"
 
 	The program goes to the background by itself, unless
-	it is run with debuging enabled (see the -D option in the
+	it is run with debugging enabled (see the -D option in the
         documentation).
 
 ========== DOCS
Index: src/gpm.c
===================================================================
RCS file: /data/cvs/gpm/src/gpm.c,v
retrieving revision 1.4
diff -u -r1.4 gpm.c
--- src/gpm.c	30 Nov 2002 13:20:09 -0000	1.4
+++ src/gpm.c	16 Mar 2003 16:56:59 -0000
@@ -259,8 +259,13 @@
          if (event->buttons==GPM_B_LEFT) {
             if (event->margin) /* fix margins */
                switch(event->margin) {
-                  case GPM_TOP: x2=1; y2++; break;
-                  case GPM_BOT: x2=maxx; y2--; break;
+		  /* we really don't want to do a "line select" in vertical
+		   * border cases, since noticing the exact cursor position
+		   * at the border is very difficult. Such behaviour is
+		   * highly annoying ("skippy") and UNWANTED: commented out
+		   * relevant parts. (besides, X11 doesn't do it either!) */
+                  case GPM_TOP: /* x2=1; */ y2++; break;
+                  case GPM_BOT: /* x2=maxx; */ y2--; break;
                   case GPM_RGT: x2--; break;
                   case GPM_LFT: y2<=y1 ? x2++ : (x2=maxx, y2--); break;
                }
@@ -1036,7 +1041,7 @@
 
       gpm_report(GPM_PR_DEBUG,GPM_MESS_SELECT_TIMES,pending);
 
-/*....................................... manage graphic mode */
+/*....................................... manage graphics mode */
 
      /* 
       * Be sure to be in text mode. This used to be before select,
@@ -1059,7 +1064,7 @@
 /*....................................... got mouse, process event */
 /*
  * Well, actually, run a loop to maintain inlining of functions without
- * lenghtening the file. This is not too clean a code, but it works....
+ * lengthening the file. This is not too clean a code, but it works....
  */
 
       for (i=1; i <= 1+opt_double; i++) {
Index: src/startup.c
===================================================================
RCS file: /data/cvs/gpm/src/startup.c,v
retrieving revision 1.2
diff -u -r1.2 startup.c
--- src/startup.c	24 Dec 2002 23:24:48 -0000	1.2
+++ src/startup.c	16 Mar 2003 16:56:59 -0000
@@ -145,7 +145,7 @@
       if (setsid() < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_SETSID_FAILED);
    }
 
-   /* damon init: check whether we run or not, display message */
+   /* daemon init: check whether we run or not, display message */
    check_uniqueness();
    gpm_report(GPM_PR_INFO,GPM_MESS_STARTED);
 

-- 
Help prevent Information Technology Fascism! - before it's too late...
http://www.againsttcpa.com