aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/02-w3m-dev-01739
blob: 2004d9eb239b651230336eabc11b3811100b3561 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
PATCH: -p0
To: w3m-dev@mi.med.tohoku.ac.jp
Cc: kiwamu <kiwamu@ecomp.metro-u.ac.jp>
Subject: [w3m-dev 01739] $B%[%$!<%k%^%&%9BP1~(B patch
From: kiwamu <kiwamu@debian.or.jp>
Delivered-To: ukai@ukai.org
Delivered-To: ukai@debian.or.jp
Date: Sun, 18 Feb 2001 02:24:27 +0900
Reply-To: w3m-dev@mi.med.tohoku.ac.jp
Message-Id: <20010218022427.A3347@casper.m01.htmnet.ne.jp>
X-ML-Name: w3m-dev
X-Mail-Count: 01739
X-MLServer: fml [fml 3.0]; post only (only members can post)
X-ML-Info: If you have a question, send e-mail with the body	"help" (without quotes) to the address w3m-dev-ctl@mi.med.tohoku.ac.jp;	help=<mailto:w3m-dev-ctl@mi.med.tohoku.ac.jp?body=help>
Resent-From: kiwamu@misterdosv.eei.metro-u.ac.jp
Content-Disposition: inline
User-Agent: Mutt/1.2.5i-jp0
Resent-Date: Sun, 18 Feb 2001 04:39:48 +0900
Resent-To: w3m-dev@mi.med.tohoku.ac.jp
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Resent-Sender: w3m-dev-admin@mi.med.tohoku.ac.jp

 $B$3$s$K$A$O!#2,It5f$H?=$7$^$9!#(B
$B$"$N2,It9nLi$5$s$H$OJL?M$G$9!#(B(^^;;

w3m$B$r%[%$!<%k%^%&%9BP1~$5$;$F$_$^$7$?!#(B
rxvt$B$H(Bxterm$B$G;HMQ$G$-$^$9!#(B
kterm$B$@$H%[%$!<%k$N>e2<$,F1$8%3%s%H%m!<%k%3!<%I$rJV$7$F$7$^$&$N$G(B
$B<B8=IT2DG=$_$?$$$G$9!#(B

------------------------------ w3m-wheel.patch ------------------------------

--- main.c	Wed Feb  7 01:53:49 2001
+++ main.c	Sun Feb 18 02:05:41 2001
@@ -3461,14 +3461,19 @@
 #define MOUSE_BTN1_DOWN 0
 #define MOUSE_BTN2_DOWN 1
 #define MOUSE_BTN3_DOWN 2
+#define MOUSE_BTN4_DOWN_RXVT 3
+#define MOUSE_BTN5_DOWN_RXVT 4
+#define MOUSE_BTN4_DOWN_XTERM 64
+#define MOUSE_BTN5_DOWN_XTERM 65
 #define MOUSE_BTN_UP 3
-
+#define MOUSE_BTN_RESET -1
+#define MOUSE_SCROLL_LINE 5
 
 static void
 process_mouse(int btn, int x, int y)
 {
-    int delta_x, delta_y;
-    static int press_btn, press_x, press_y;
+    int delta_x, delta_y, i;
+    static int press_btn = MOUSE_BTN_RESET, press_x, press_y;
 
     if (btn == MOUSE_BTN_UP) {
 	switch (press_btn) {
@@ -3547,12 +3552,29 @@
 	    mainMenu(x, y);
 #endif				/* MENU */
 	    break;
+	case MOUSE_BTN4_DOWN_RXVT:
+	    for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+	      ldown1();
+	    break;
+	case MOUSE_BTN5_DOWN_RXVT:
+	    for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+	      lup1();
+	    break;
 	}
+    } else if (btn == MOUSE_BTN4_DOWN_XTERM) {
+	for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+	  ldown1();
+    } else if (btn == MOUSE_BTN5_DOWN_XTERM) {
+	for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+	  lup1();
     }
-    else {
+    
+    if (btn != MOUSE_BTN4_DOWN_RXVT || press_btn == MOUSE_BTN_RESET) {
 	press_btn = btn;
 	press_x = x;
 	press_y = y;
+    } else {
+	press_btn = MOUSE_BTN_RESET;
     }
 }
 
--- menu.c	Wed Feb  7 01:53:49 2001
+++ menu.c	Sun Feb 18 02:05:50 2001
@@ -1067,14 +1067,20 @@
 #define MOUSE_BTN1_DOWN 0
 #define MOUSE_BTN2_DOWN 1
 #define MOUSE_BTN3_DOWN 2
+#define MOUSE_BTN4_DOWN_RXVT 3
+#define MOUSE_BTN5_DOWN_RXVT 4
+#define MOUSE_BTN4_DOWN_XTERM 64
+#define MOUSE_BTN5_DOWN_XTERM 65
 #define MOUSE_BTN_UP 3
+#define MOUSE_BTN_RESET -1
+#define MOUSE_SCROLL_LINE 5
 
 static int
 process_mMouse(int btn, int x, int y)
 {
     Menu *menu;
     int select;
-    static int press_btn, press_x, press_y;
+    static int press_btn = MOUSE_BTN_RESET, press_x, press_y;
     char c = ' ';
 
     menu = CurrentMenu;

------------------------------ w3m-wheel.patch ------------------------------

-- 
Tokyo Metropolitan University     Kiwamu Okabe
 Mail: kiwamu@debian.or.jp
 URL:  http://silica.eei.metro-u.ac.jp/~kiwamu/