diff options
author | Richard Purdie <richard@openedhand.com> | 2008-01-11 12:56:32 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-01-11 12:56:32 +0000 |
commit | a30424c269479d1e722932c24f1c7e260914c390 (patch) | |
tree | 5d1fb4a8c704cb005ad65e4a234e5772e4994495 /meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0 | |
parent | 3156c5a82c5dc88df276c34113c77bc168cc9d47 (diff) | |
download | poky-a30424c269479d1e722932c24f1c7e260914c390.tar.gz |
xserver-kdrive: Clean up unused patches and broken git recipe
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3465 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0')
9 files changed, 997 insertions, 0 deletions
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/disable-apm.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/disable-apm.patch new file mode 100644 index 0000000000..bd8842721b --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/disable-apm.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | --- xserver/hw/kdrive/linux/linux.c.orig 2005-04-23 15:56:13.988849232 +0000 | ||
2 | +++ xserver/hw/kdrive/linux/linux.c 2005-04-23 15:57:05.001094192 +0000 | ||
3 | @@ -342,7 +342,7 @@ | ||
4 | /* | ||
5 | * Open the APM driver | ||
6 | */ | ||
7 | - LinuxApmFd = open ("/dev/apm_bios", 2); | ||
8 | + /*LinuxApmFd = open ("/dev/apm_bios", 2); | ||
9 | if (LinuxApmFd < 0 && errno == ENOENT) | ||
10 | LinuxApmFd = open ("/dev/misc/apm_bios", 2); | ||
11 | if (LinuxApmFd >= 0) | ||
12 | @@ -352,7 +352,7 @@ | ||
13 | RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0); | ||
14 | AddEnabledDevice (LinuxApmFd); | ||
15 | } | ||
16 | - | ||
17 | + */ | ||
18 | /* | ||
19 | * now get the VT | ||
20 | */ | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/enable-builtin-fonts.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/enable-builtin-fonts.patch new file mode 100644 index 0000000000..13a6c2c954 --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/enable-builtin-fonts.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | --- xorg-server-X11R7.1-1.1.0/dix/dixfonts.c.orig 2006-06-08 14:49:12.158684250 +0200 | ||
2 | +++ xorg-server-X11R7.1-1.1.0/dix/dixfonts.c 2006-06-08 14:49:52.493205000 +0200 | ||
3 | @@ -52,8 +52,8 @@ | ||
4 | /* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */ | ||
5 | |||
6 | #define NEED_REPLIES | ||
7 | #ifdef HAVE_DIX_CONFIG_H | ||
8 | -#include <dix-config.h> | ||
9 | +#include <kdrive-config.h> | ||
10 | #endif | ||
11 | |||
12 | #include <X11/X.h> | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/fbdev-not-fix.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/fbdev-not-fix.patch new file mode 100644 index 0000000000..f87e7cc2cd --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/fbdev-not-fix.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | --- xserver/hw/kdrive/fbdev/fbdev.c~ 2004-09-15 00:08:10.000000000 +0100 | ||
2 | +++ xserver/hw/kdrive/fbdev/fbdev.c 2004-11-13 17:47:02.000000000 +0000 | ||
3 | @@ -198,6 +198,11 @@ | ||
4 | return FALSE; | ||
5 | } | ||
6 | |||
7 | + /* Re-get the "fixed" parameters since they might have changed */ | ||
8 | + k = ioctl (priv->fd, FBIOGET_FSCREENINFO, &priv->fix); | ||
9 | + if (k < 0) | ||
10 | + perror ("FBIOGET_FSCREENINFO"); | ||
11 | + | ||
12 | /* Now get the new screeninfo */ | ||
13 | ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var); | ||
14 | depth = priv->var.bits_per_pixel; | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch new file mode 100644 index 0000000000..c160cd41dc --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch | |||
@@ -0,0 +1,307 @@ | |||
1 | diff -u -r xorg-server-X11R7.1-1.1.0.orig/dix/window.c xorg-server-X11R7.1-1.1.0/dix/window.c | ||
2 | --- xorg-server-X11R7.1-1.1.0.orig/dix/window.c 2007-01-08 14:30:38.000000000 +0000 | ||
3 | +++ xorg-server-X11R7.1-1.1.0/dix/window.c 2007-01-16 17:16:19.000000000 +0000 | ||
4 | @@ -185,6 +185,8 @@ | ||
5 | _X_EXPORT int numSaveUndersViewable = 0; | ||
6 | _X_EXPORT int deltaSaveUndersViewable = 0; | ||
7 | |||
8 | +char* RootPPM = NULL; | ||
9 | + | ||
10 | #ifdef DEBUG | ||
11 | /****** | ||
12 | * PrintWindowTree | ||
13 | @@ -311,6 +313,115 @@ | ||
14 | #endif | ||
15 | } | ||
16 | |||
17 | +static int | ||
18 | +get_int(FILE *fp) | ||
19 | +{ | ||
20 | + int c = 0; | ||
21 | + | ||
22 | + while ((c = getc(fp)) != EOF) | ||
23 | + { | ||
24 | + if (isspace(c)) | ||
25 | + continue; | ||
26 | + | ||
27 | + if (c == '#') | ||
28 | + while (c = getc(fp)) | ||
29 | + if (c == EOF) | ||
30 | + return 0; | ||
31 | + else if (c == '\n') | ||
32 | + break; | ||
33 | + | ||
34 | + if (isdigit(c)) | ||
35 | + { | ||
36 | + int val = c - '0'; | ||
37 | + while ((c = getc(fp)) && isdigit(c)) | ||
38 | + val = (val * 10) + (c - '0'); | ||
39 | + return val; | ||
40 | + } | ||
41 | + } | ||
42 | + | ||
43 | + return 0; | ||
44 | +} | ||
45 | + | ||
46 | +static unsigned char* | ||
47 | +ppm_load (const char* path, int depth, int *width, int *height) | ||
48 | +{ | ||
49 | + FILE *fp; | ||
50 | + int max, n = 0, w, h, i, j, bytes_per_line; | ||
51 | + unsigned char *data, *res, h1, h2; | ||
52 | + | ||
53 | + if (depth < 16 || depth > 32) | ||
54 | + return NULL; | ||
55 | + | ||
56 | + if (depth > 16) | ||
57 | + depth = 32; | ||
58 | + | ||
59 | + fp = fopen (path, "r"); | ||
60 | + if (fp == NULL) | ||
61 | + return FALSE; | ||
62 | + | ||
63 | + h1 = getc(fp); | ||
64 | + h2 = getc(fp); | ||
65 | + | ||
66 | + /* magic is 'P6' for raw ppm */ | ||
67 | + if (h1 != 'P' && h2 != '6') | ||
68 | + goto fail; | ||
69 | + | ||
70 | + w = get_int(fp); | ||
71 | + h = get_int(fp); | ||
72 | + | ||
73 | + if (w == 0 || h == 0) | ||
74 | + goto fail; | ||
75 | + | ||
76 | + max = get_int(fp); | ||
77 | + | ||
78 | + if (max != 255) | ||
79 | + goto fail; | ||
80 | + | ||
81 | + bytes_per_line = ((w * depth + 31) >> 5) << 2; | ||
82 | + | ||
83 | + res = data = malloc(bytes_per_line * h); | ||
84 | + | ||
85 | + for (i=0; i<h; i++) | ||
86 | + { | ||
87 | + for (j=0; j<w; j++) | ||
88 | + { | ||
89 | + unsigned char buf[3]; | ||
90 | + fread(buf, 1, 3, fp); | ||
91 | + | ||
92 | + switch (depth) | ||
93 | + { | ||
94 | + case 24: | ||
95 | + case 32: | ||
96 | + *data = buf[2]; | ||
97 | + *(data+1) = buf[1]; | ||
98 | + *(data+2) = buf[0]; | ||
99 | + data += 4; | ||
100 | + break; | ||
101 | + case 16: | ||
102 | + default: | ||
103 | + *(unsigned short*)data | ||
104 | + = ((buf[0] >> 3) << 11) | ((buf[1] >> 2) << 5) | (buf[2] >> 3); | ||
105 | + data += 2; | ||
106 | + break; | ||
107 | + } | ||
108 | + } | ||
109 | + data += (bytes_per_line - (w*(depth>>3))); | ||
110 | + } | ||
111 | + | ||
112 | + data = res; | ||
113 | + | ||
114 | + *width = w; | ||
115 | + *height = h; | ||
116 | + | ||
117 | + fclose(fp); | ||
118 | + | ||
119 | + return res; | ||
120 | + | ||
121 | + fail: | ||
122 | + fclose(fp); | ||
123 | + return NULL; | ||
124 | +} | ||
125 | + | ||
126 | static void | ||
127 | MakeRootTile(WindowPtr pWin) | ||
128 | { | ||
129 | @@ -321,6 +432,36 @@ | ||
130 | register unsigned char *from, *to; | ||
131 | register int i, j; | ||
132 | |||
133 | + if (RootPPM != NULL) | ||
134 | + { | ||
135 | + int w, h; | ||
136 | + unsigned char *data; | ||
137 | + | ||
138 | + if ((data = ppm_load (RootPPM, pScreen->rootDepth, &w, &h)) != NULL) | ||
139 | + { | ||
140 | + pWin->background.pixmap | ||
141 | + = (*pScreen->CreatePixmap)(pScreen, w, h, pScreen->rootDepth); | ||
142 | + | ||
143 | + pWin->backgroundState = BackgroundPixmap; | ||
144 | + pGC = GetScratchGC(pScreen->rootDepth, pScreen); | ||
145 | + if (!pWin->background.pixmap || !pGC) | ||
146 | + FatalError("could not create root tile"); | ||
147 | + | ||
148 | + ValidateGC((DrawablePtr)pWin->background.pixmap, pGC); | ||
149 | + | ||
150 | + (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, | ||
151 | + pGC, | ||
152 | + pScreen->rootDepth, | ||
153 | + 0, 0, w, h, 0, ZPixmap, (char *)data); | ||
154 | + FreeScratchGC(pGC); | ||
155 | + | ||
156 | + free(data); | ||
157 | + return; | ||
158 | + } | ||
159 | + else | ||
160 | + ErrorF("Unable to load root window image."); | ||
161 | + } | ||
162 | + | ||
163 | pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4, | ||
164 | pScreen->rootDepth); | ||
165 | |||
166 | @@ -357,6 +498,7 @@ | ||
167 | |||
168 | } | ||
169 | |||
170 | + | ||
171 | WindowPtr | ||
172 | AllocateWindow(ScreenPtr pScreen) | ||
173 | { | ||
174 | diff -u -r xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c | ||
175 | --- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c 2007-01-08 14:30:38.000000000 +0000 | ||
176 | +++ xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c 2007-01-15 17:53:06.000000000 +0000 | ||
177 | @@ -58,6 +58,9 @@ | ||
178 | { 32, 32 } | ||
179 | }; | ||
180 | |||
181 | +int | ||
182 | +ProcXFixesHideCursor (ClientPtr client) ; | ||
183 | + | ||
184 | #define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0])) | ||
185 | |||
186 | int kdScreenPrivateIndex; | ||
187 | @@ -84,6 +87,9 @@ | ||
188 | KdOsFuncs *kdOsFuncs; | ||
189 | extern WindowPtr *WindowTable; | ||
190 | |||
191 | +extern Bool CursorInitiallyHidden; /* See Xfixes cursor.c */ | ||
192 | +extern char* RootPPM; /* dix/window.c */ | ||
193 | + | ||
194 | void | ||
195 | KdSetRootClip (ScreenPtr pScreen, BOOL enable) | ||
196 | { | ||
197 | @@ -312,6 +318,7 @@ | ||
198 | KdSetRootClip (pScreen, TRUE); | ||
199 | if (pScreenPriv->card->cfuncs->dpms) | ||
200 | (*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState); | ||
201 | + | ||
202 | return TRUE; | ||
203 | } | ||
204 | |||
205 | @@ -686,10 +693,14 @@ | ||
206 | ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n"); | ||
207 | ErrorF("-switchCmd Command to execute on vt switch\n"); | ||
208 | ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n"); | ||
209 | + ErrorF("-hide-cursor Start with cursor hidden\n"); | ||
210 | + ErrorF("-root-ppm [path] Specify ppm file to use as root window background.\n"); | ||
211 | ErrorF("vtxx Use virtual terminal xx instead of the next available\n"); | ||
212 | #ifdef PSEUDO8 | ||
213 | p8UseMsg (); | ||
214 | #endif | ||
215 | + | ||
216 | + | ||
217 | } | ||
218 | |||
219 | int | ||
220 | @@ -761,6 +772,19 @@ | ||
221 | kdSoftCursor = TRUE; | ||
222 | return 1; | ||
223 | } | ||
224 | + if (!strcmp (argv[i], "-hide-cursor")) | ||
225 | + { | ||
226 | + CursorInitiallyHidden = TRUE; | ||
227 | + return 1; | ||
228 | + } | ||
229 | + if (!strcmp (argv[i], "-root-ppm")) | ||
230 | + { | ||
231 | + if ((i+1) < argc) | ||
232 | + RootPPM = argv[i+1]; | ||
233 | + else | ||
234 | + UseMsg (); | ||
235 | + return 2; | ||
236 | + } | ||
237 | if (!strcmp (argv[i], "-videoTest")) | ||
238 | { | ||
239 | kdVideoTest = TRUE; | ||
240 | diff -u -r xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c xorg-server-X11R7.1-1.1.0/xfixes/cursor.c | ||
241 | --- xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c 2007-01-08 14:30:38.000000000 +0000 | ||
242 | +++ xorg-server-X11R7.1-1.1.0/xfixes/cursor.c 2007-01-11 16:33:00.000000000 +0000 | ||
243 | @@ -59,9 +59,12 @@ | ||
244 | static RESTYPE CursorWindowType; | ||
245 | static int CursorScreenPrivateIndex = -1; | ||
246 | static int CursorGeneration; | ||
247 | +static Bool CursorGloballyHidden; | ||
248 | static CursorPtr CursorCurrent; | ||
249 | static CursorPtr pInvisibleCursor = NULL; | ||
250 | |||
251 | +Bool CursorInitiallyHidden = FALSE; | ||
252 | + | ||
253 | static void deleteCursorHideCountsForScreen (ScreenPtr pScreen); | ||
254 | |||
255 | #define VERIFY_CURSOR(pCursor, cursor, client, access) { \ | ||
256 | @@ -130,7 +133,7 @@ | ||
257 | |||
258 | Unwrap (cs, pScreen, DisplayCursor); | ||
259 | |||
260 | - if (cs->pCursorHideCounts != NULL) { | ||
261 | + if (cs->pCursorHideCounts != NULL || CursorGloballyHidden) { | ||
262 | ret = (*pScreen->DisplayCursor) (pScreen, pInvisibleCursor); | ||
263 | } else { | ||
264 | ret = (*pScreen->DisplayCursor) (pScreen, pCursor); | ||
265 | @@ -848,6 +851,12 @@ | ||
266 | return BadWindow; | ||
267 | } | ||
268 | |||
269 | + /* Is cursor set to be initially hidden ?, if so reset this | ||
270 | + * flag as now visibility assumed under control of client. | ||
271 | + */ | ||
272 | + if (CursorGloballyHidden) | ||
273 | + CursorGloballyHidden = FALSE; | ||
274 | + | ||
275 | /* | ||
276 | * Has client hidden the cursor before on this screen? | ||
277 | * If so, just increment the count. | ||
278 | @@ -899,9 +908,19 @@ | ||
279 | return BadWindow; | ||
280 | } | ||
281 | |||
282 | + /* X was started with cursor hidden, therefore just reset our flag | ||
283 | + * (returning to normal client control) and cause cursor to now be | ||
284 | + * shown. | ||
285 | + */ | ||
286 | + if (CursorGloballyHidden == TRUE) | ||
287 | + { | ||
288 | + CursorGloballyHidden = FALSE; | ||
289 | + return (client->noClientException); | ||
290 | + } | ||
291 | + | ||
292 | /* | ||
293 | * Has client hidden the cursor on this screen? | ||
294 | - * If not, generate an error. | ||
295 | + * If so, generate an error. | ||
296 | */ | ||
297 | pChc = findCursorHideCount(client, pWin->drawable.pScreen); | ||
298 | if (pChc == NULL) { | ||
299 | @@ -1009,6 +1028,8 @@ | ||
300 | XFixesCursorInit (void) | ||
301 | { | ||
302 | int i; | ||
303 | + | ||
304 | + CursorGloballyHidden = CursorInitiallyHidden; | ||
305 | |||
306 | if (CursorGeneration != serverGeneration) | ||
307 | { | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch new file mode 100644 index 0000000000..2dc22bf50e --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch | |||
@@ -0,0 +1,515 @@ | |||
1 | # Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at | ||
2 | # http://lists.freedesktop.org/archives/xorg/2005-December/011635.html | ||
3 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/linux/evdev.c xserver/hw/kdrive/linux/evdev.c | ||
4 | --- xserver.original/hw/kdrive/linux/evdev.c 2005-12-16 10:36:05.000000000 -0200 | ||
5 | +++ xserver/hw/kdrive/linux/evdev.c 2005-12-16 10:40:51.077410192 -0200 | ||
6 | @@ -31,9 +31,11 @@ | ||
7 | #include <X11/X.h> | ||
8 | #include <X11/Xproto.h> | ||
9 | #include <X11/Xpoll.h> | ||
10 | +#include <X11/keysym.h> | ||
11 | #include "inputstr.h" | ||
12 | #include "scrnintstr.h" | ||
13 | #include "kdrive.h" | ||
14 | +#include "kkeymap.h" | ||
15 | |||
16 | #define NUM_EVENTS 128 | ||
17 | #define ABS_UNSET -65535 | ||
18 | @@ -105,9 +107,10 @@ | ||
19 | { | ||
20 | KdMouseInfo *mi = closure; | ||
21 | Kevdev *ke = mi->driver; | ||
22 | - int i; | ||
23 | + int i, j; | ||
24 | struct input_event events[NUM_EVENTS]; | ||
25 | int n; | ||
26 | + int flags; | ||
27 | |||
28 | n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event)); | ||
29 | if (n <= 0) | ||
30 | @@ -115,22 +118,64 @@ | ||
31 | n /= sizeof (struct input_event); | ||
32 | for (i = 0; i < n; i++) | ||
33 | { | ||
34 | + flags = KD_MOUSE_DELTA | kdMouseInfo->buttonState; | ||
35 | switch (events[i].type) { | ||
36 | case EV_SYN: | ||
37 | break; | ||
38 | case EV_KEY: | ||
39 | - EvdevMotion (mi); | ||
40 | - ASSIGNBIT(ke->key,events[i].code, events[i].value); | ||
41 | - if (events[i].code < 0x100) | ||
42 | - ErrorF ("key %d %d\n", events[i].code, events[i].value); | ||
43 | - else | ||
44 | - ErrorF ("key 0x%x %d\n", events[i].code, events[i].value); | ||
45 | + if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) { | ||
46 | + switch (events[i].code) { | ||
47 | + case BTN_LEFT: | ||
48 | + if (events[i].value == 1) | ||
49 | + flags |= KD_BUTTON_1; | ||
50 | + else | ||
51 | + flags &= ~KD_BUTTON_1; | ||
52 | + break; | ||
53 | + case BTN_MIDDLE: | ||
54 | + if (events[i].value == 1) | ||
55 | + flags |= KD_BUTTON_2; | ||
56 | + else | ||
57 | + flags &= ~KD_BUTTON_2; | ||
58 | + break; | ||
59 | + case BTN_RIGHT: | ||
60 | + if (events[i].value == 1) | ||
61 | + flags |= KD_BUTTON_3; | ||
62 | + else | ||
63 | + flags &= ~KD_BUTTON_3; | ||
64 | + break; | ||
65 | + default: | ||
66 | + /* Unknow button */ | ||
67 | + break; | ||
68 | + } | ||
69 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0); | ||
70 | + } | ||
71 | break; | ||
72 | case EV_REL: | ||
73 | - ke->rel[events[i].code] += events[i].value; | ||
74 | + if (events[i].code == REL_X) { | ||
75 | + KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0); | ||
76 | + } | ||
77 | + else if (events[i].code == REL_Y) { | ||
78 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value); | ||
79 | + } | ||
80 | + else if (events[i].code == REL_WHEEL) { | ||
81 | + for (j = 0; j < abs (events[i].value); j++) { | ||
82 | + if (events[i].value > 0) | ||
83 | + flags |= KD_BUTTON_4; | ||
84 | + else | ||
85 | + flags |= KD_BUTTON_5; | ||
86 | + | ||
87 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0); | ||
88 | + | ||
89 | + if (events[i].value > 0) | ||
90 | + flags &= ~KD_BUTTON_4; | ||
91 | + else | ||
92 | + flags &= ~KD_BUTTON_5; | ||
93 | + | ||
94 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0); | ||
95 | + } /* events[i].code == REL_WHEEL */ | ||
96 | + } | ||
97 | break; | ||
98 | case EV_ABS: | ||
99 | - ke->abs[events[i].code] = events[i].value; | ||
100 | break; | ||
101 | } | ||
102 | } | ||
103 | @@ -173,6 +218,12 @@ | ||
104 | fd = open (kdefaultEvdev[i], 2); | ||
105 | if (fd >= 0) | ||
106 | { | ||
107 | + if (ioctl (fd, EVIOCGRAB, 1) < 0) | ||
108 | + { | ||
109 | + close (fd); | ||
110 | + continue; | ||
111 | + } | ||
112 | + | ||
113 | mi->name = KdSaveString (kdefaultEvdev[i]); | ||
114 | break; | ||
115 | } | ||
116 | @@ -287,7 +338,319 @@ | ||
117 | EvdevFini, | ||
118 | }; | ||
119 | |||
120 | -#if 0 | ||
121 | +/* Keyboard */ | ||
122 | + | ||
123 | +int kbd_fd = -1; | ||
124 | +int EvdevInputType = 0; | ||
125 | + | ||
126 | +KeySym evdevKeymap[(194 - 1 + 1) * 2] = { | ||
127 | +/* These are directly mapped from DOS scanset 0 */ | ||
128 | +/* 1 8 */ XK_Escape, NoSymbol, | ||
129 | +/* 2 9 */ XK_1, XK_exclam, | ||
130 | +/* 3 10 */ XK_2, XK_at, | ||
131 | +/* 4 11 */ XK_3, XK_numbersign, | ||
132 | +/* 5 12 */ XK_4, XK_dollar, | ||
133 | +/* 6 13 */ XK_5, XK_percent, | ||
134 | +/* 7 14 */ XK_6, XK_asciicircum, | ||
135 | +/* 8 15 */ XK_7, XK_ampersand, | ||
136 | +/* 9 16 */ XK_8, XK_asterisk, | ||
137 | +/* 10 17 */ XK_9, XK_parenleft, | ||
138 | +/* 11 18 */ XK_0, XK_parenright, | ||
139 | +/* 12 19 */ XK_minus, XK_underscore, | ||
140 | +/* 13 20 */ XK_equal, XK_plus, | ||
141 | +/* 14 21 */ XK_BackSpace, NoSymbol, | ||
142 | +/* 15 22 */ XK_Tab, NoSymbol, | ||
143 | +/* 16 23 */ XK_Q, NoSymbol, | ||
144 | +/* 17 24 */ XK_W, NoSymbol, | ||
145 | +/* 18 25 */ XK_E, NoSymbol, | ||
146 | +/* 19 26 */ XK_R, NoSymbol, | ||
147 | +/* 20 27 */ XK_T, NoSymbol, | ||
148 | +/* 21 28 */ XK_Y, NoSymbol, | ||
149 | +/* 22 29 */ XK_U, NoSymbol, | ||
150 | +/* 23 30 */ XK_I, NoSymbol, | ||
151 | +/* 24 31 */ XK_O, NoSymbol, | ||
152 | +/* 25 32 */ XK_P, NoSymbol, | ||
153 | +/* 26 33 */ XK_bracketleft, XK_braceleft, | ||
154 | +/* 27 34 */ XK_bracketright, XK_braceright, | ||
155 | +/* 28 35 */ XK_Return, NoSymbol, | ||
156 | +/* 29 36 */ XK_Control_L, NoSymbol, | ||
157 | +/* 30 37 */ XK_A, NoSymbol, | ||
158 | +/* 31 38 */ XK_S, NoSymbol, | ||
159 | +/* 32 39 */ XK_D, NoSymbol, | ||
160 | +/* 33 40 */ XK_F, NoSymbol, | ||
161 | +/* 34 41 */ XK_G, NoSymbol, | ||
162 | +/* 35 42 */ XK_H, NoSymbol, | ||
163 | +/* 36 43 */ XK_J, NoSymbol, | ||
164 | +/* 37 44 */ XK_K, NoSymbol, | ||
165 | +/* 38 45 */ XK_L, NoSymbol, | ||
166 | +/* 39 46 */ XK_semicolon, XK_colon, | ||
167 | +/* 40 47 */ XK_apostrophe, XK_quotedbl, | ||
168 | +/* 41 48 */ XK_grave, XK_asciitilde, | ||
169 | +/* 42 49 */ XK_Shift_L, NoSymbol, | ||
170 | +/* 43 50 */ XK_backslash, XK_bar, | ||
171 | +/* 44 51 */ XK_Z, NoSymbol, | ||
172 | +/* 45 52 */ XK_X, NoSymbol, | ||
173 | +/* 46 53 */ XK_C, NoSymbol, | ||
174 | +/* 47 54 */ XK_V, NoSymbol, | ||
175 | +/* 48 55 */ XK_B, NoSymbol, | ||
176 | +/* 49 56 */ XK_N, NoSymbol, | ||
177 | +/* 50 57 */ XK_M, NoSymbol, | ||
178 | +/* 51 58 */ XK_comma, XK_less, | ||
179 | +/* 52 59 */ XK_period, XK_greater, | ||
180 | +/* 53 60 */ XK_slash, XK_question, | ||
181 | +/* 54 61 */ XK_Shift_R, NoSymbol, | ||
182 | +/* 55 62 */ XK_KP_Multiply, NoSymbol, | ||
183 | +/* 56 63 */ XK_Alt_L, XK_Meta_L, | ||
184 | +/* 57 64 */ XK_space, NoSymbol, | ||
185 | +/* 58 65 */ XK_Caps_Lock, NoSymbol, | ||
186 | +/* 59 66 */ XK_F1, NoSymbol, | ||
187 | +/* 60 67 */ XK_F2, NoSymbol, | ||
188 | +/* 61 68 */ XK_F3, NoSymbol, | ||
189 | +/* 62 69 */ XK_F4, NoSymbol, | ||
190 | +/* 63 70 */ XK_F5, NoSymbol, | ||
191 | +/* 64 71 */ XK_F6, NoSymbol, | ||
192 | +/* 65 72 */ XK_F7, NoSymbol, | ||
193 | +/* 66 73 */ XK_F8, NoSymbol, | ||
194 | +/* 67 74 */ XK_F9, NoSymbol, | ||
195 | +/* 68 75 */ XK_F10, NoSymbol, | ||
196 | +/* 69 76 */ XK_Break, XK_Pause, | ||
197 | +/* 70 77 */ XK_Scroll_Lock, NoSymbol, | ||
198 | +/* 71 78 */ XK_KP_Home, XK_KP_7, | ||
199 | +/* 72 79 */ XK_KP_Up, XK_KP_8, | ||
200 | +/* 73 80 */ XK_KP_Page_Up, XK_KP_9, | ||
201 | +/* 74 81 */ XK_KP_Subtract, NoSymbol, | ||
202 | +/* 75 82 */ XK_KP_Left, XK_KP_4, | ||
203 | +/* 76 83 */ XK_KP_5, NoSymbol, | ||
204 | +/* 77 84 */ XK_KP_Right, XK_KP_6, | ||
205 | +/* 78 85 */ XK_KP_Add, NoSymbol, | ||
206 | +/* 79 86 */ XK_KP_End, XK_KP_1, | ||
207 | +/* 80 87 */ XK_KP_Down, XK_KP_2, | ||
208 | +/* 81 88 */ XK_KP_Page_Down, XK_KP_3, | ||
209 | +/* 82 89 */ XK_KP_Insert, XK_KP_0, | ||
210 | +/* 83 90 */ XK_KP_Delete, XK_KP_Decimal, | ||
211 | +/* 84 91 */ NoSymbol, NoSymbol, | ||
212 | +/* 85 92 */ NoSymbol, NoSymbol, | ||
213 | +/* 86 93 */ NoSymbol, NoSymbol, | ||
214 | +/* 87 94 */ XK_F11, NoSymbol, | ||
215 | +/* 88 95 */ XK_F12, NoSymbol, | ||
216 | + | ||
217 | +/* These are remapped from the extended set (using ExtendMap) */ | ||
218 | + | ||
219 | +/* 89 96 */ XK_Control_R, NoSymbol, | ||
220 | +/* 90 97 */ XK_KP_Enter, NoSymbol, | ||
221 | +/* 91 98 */ XK_KP_Divide, NoSymbol, | ||
222 | +/* 92 99 */ XK_Sys_Req, XK_Print, | ||
223 | +/* 93 100 */ XK_Alt_R, XK_Meta_R, | ||
224 | +/* 94 101 */ XK_Num_Lock, NoSymbol, | ||
225 | +/* 95 102 */ XK_Home, NoSymbol, | ||
226 | +/* 96 103 */ XK_Up, NoSymbol, | ||
227 | +/* 97 104 */ XK_Page_Up, NoSymbol, | ||
228 | +/* 98 105 */ XK_Left, NoSymbol, | ||
229 | +/* 99 106 */ XK_Right, NoSymbol, | ||
230 | +/* 100 107 */ XK_End, NoSymbol, | ||
231 | +/* 101 108 */ XK_Down, NoSymbol, | ||
232 | +/* 102 109 */ XK_Page_Down, NoSymbol, | ||
233 | +/* 103 110 */ XK_Insert, NoSymbol, | ||
234 | +/* 104 111 */ XK_Delete, NoSymbol, | ||
235 | +/* 105 112 */ XK_Super_L, NoSymbol, | ||
236 | +/* 106 113 */ XK_Super_R, NoSymbol, | ||
237 | +/* 107 114 */ XK_Menu, NoSymbol, | ||
238 | +/* 108 115 */ NoSymbol, NoSymbol, | ||
239 | +/* 109 116 */ NoSymbol, NoSymbol, | ||
240 | +/* 110 117 */ NoSymbol, NoSymbol, | ||
241 | +/* 111 118 */ NoSymbol, NoSymbol, | ||
242 | +/* 112 119 */ NoSymbol, NoSymbol, | ||
243 | + | ||
244 | +/* 113 120 */ NoSymbol, NoSymbol, | ||
245 | +/* 114 121 */ NoSymbol, NoSymbol, | ||
246 | +/* 115 122 */ NoSymbol, NoSymbol, | ||
247 | +/* 116 123 */ NoSymbol, NoSymbol, | ||
248 | +/* 117 124 */ NoSymbol, NoSymbol, | ||
249 | +/* 118 125 */ NoSymbol, NoSymbol, | ||
250 | +/* 119 126 */ NoSymbol, NoSymbol, | ||
251 | +/* 120 127 */ NoSymbol, NoSymbol, | ||
252 | +/* 121 128 */ NoSymbol, NoSymbol, | ||
253 | +/* 122 129 */ NoSymbol, NoSymbol, | ||
254 | +/* 123 130 */ NoSymbol, NoSymbol, | ||
255 | +/* 124 131 */ NoSymbol, NoSymbol, | ||
256 | +/* 125 132 */ NoSymbol, NoSymbol, | ||
257 | +/* 126 133 */ NoSymbol, NoSymbol, | ||
258 | +/* 127 134 */ NoSymbol, NoSymbol, | ||
259 | +/* 128 135 */ NoSymbol, NoSymbol, | ||
260 | +/* 129 136 */ NoSymbol, NoSymbol, | ||
261 | +/* 130 137 */ NoSymbol, NoSymbol, | ||
262 | +/* 131 138 */ NoSymbol, NoSymbol, | ||
263 | +/* 132 139 */ NoSymbol, NoSymbol, | ||
264 | +/* 133 140 */ NoSymbol, NoSymbol, | ||
265 | +/* 134 141 */ NoSymbol, NoSymbol, | ||
266 | +/* 135 142 */ NoSymbol, NoSymbol, | ||
267 | +/* 136 143 */ NoSymbol, NoSymbol, | ||
268 | +/* 137 144 */ NoSymbol, NoSymbol, | ||
269 | +/* 138 145 */ NoSymbol, NoSymbol, | ||
270 | +/* 139 146 */ NoSymbol, NoSymbol, | ||
271 | +/* 140 147 */ NoSymbol, NoSymbol, | ||
272 | +/* 141 148 */ NoSymbol, NoSymbol, | ||
273 | +/* 142 149 */ NoSymbol, NoSymbol, | ||
274 | +/* 143 150 */ NoSymbol, NoSymbol, | ||
275 | +/* 144 151 */ NoSymbol, NoSymbol, | ||
276 | +/* 145 152 */ NoSymbol, NoSymbol, | ||
277 | +/* 146 153 */ NoSymbol, NoSymbol, | ||
278 | +/* 147 154 */ NoSymbol, NoSymbol, | ||
279 | +/* 148 155 */ NoSymbol, NoSymbol, | ||
280 | +/* 149 156 */ NoSymbol, NoSymbol, | ||
281 | +/* 150 157 */ NoSymbol, NoSymbol, | ||
282 | +/* 151 158 */ NoSymbol, NoSymbol, | ||
283 | +/* 152 159 */ NoSymbol, NoSymbol, | ||
284 | +/* 153 160 */ NoSymbol, NoSymbol, | ||
285 | +/* 154 161 */ NoSymbol, NoSymbol, | ||
286 | +/* 155 162 */ NoSymbol, NoSymbol, | ||
287 | +/* 156 163 */ NoSymbol, NoSymbol, | ||
288 | +/* 157 164 */ NoSymbol, NoSymbol, | ||
289 | +/* 158 165 */ NoSymbol, NoSymbol, | ||
290 | +/* 159 166 */ NoSymbol, NoSymbol, | ||
291 | +/* 160 167 */ NoSymbol, NoSymbol, | ||
292 | +/* 161 168 */ NoSymbol, NoSymbol, | ||
293 | +/* 162 169 */ NoSymbol, NoSymbol, | ||
294 | +/* 163 170 */ NoSymbol, NoSymbol, | ||
295 | +/* 164 171 */ NoSymbol, NoSymbol, | ||
296 | +/* 165 172 */ NoSymbol, NoSymbol, | ||
297 | +/* 166 173 */ NoSymbol, NoSymbol, | ||
298 | +/* 167 174 */ NoSymbol, NoSymbol, | ||
299 | +/* 168 175 */ NoSymbol, NoSymbol, | ||
300 | +/* 169 176 */ NoSymbol, NoSymbol, | ||
301 | +/* 170 177 */ NoSymbol, NoSymbol, | ||
302 | +/* 171 178 */ NoSymbol, NoSymbol, | ||
303 | +/* 172 179 */ NoSymbol, NoSymbol, | ||
304 | +/* 173 180 */ NoSymbol, NoSymbol, | ||
305 | +/* 174 181 */ NoSymbol, NoSymbol, | ||
306 | +/* 175 182 */ NoSymbol, NoSymbol, | ||
307 | +/* 176 183 */ NoSymbol, NoSymbol, | ||
308 | +/* 177 184 */ NoSymbol, NoSymbol, | ||
309 | +/* 178 185 */ NoSymbol, NoSymbol, | ||
310 | +/* 179 186 */ NoSymbol, NoSymbol, | ||
311 | +/* 180 187 */ NoSymbol, NoSymbol, | ||
312 | +/* 181 188 */ NoSymbol, NoSymbol, | ||
313 | +/* 182 189 */ NoSymbol, NoSymbol, | ||
314 | +/* 183 190 */ NoSymbol, NoSymbol, | ||
315 | +/* 184 191 */ NoSymbol, NoSymbol, | ||
316 | +/* 185 192 */ NoSymbol, NoSymbol, | ||
317 | +/* 186 193 */ NoSymbol, NoSymbol, | ||
318 | +/* 187 194 */ NoSymbol, NoSymbol, | ||
319 | +/* 188 195 */ NoSymbol, NoSymbol, | ||
320 | +/* 189 196 */ NoSymbol, NoSymbol, | ||
321 | +/* 190 197 */ NoSymbol, NoSymbol, | ||
322 | +/* 191 198 */ NoSymbol, NoSymbol, | ||
323 | +/* 192 199 */ NoSymbol, NoSymbol, | ||
324 | +/* 193 200 */ NoSymbol, NoSymbol, | ||
325 | +/* 194 201 */ NoSymbol, NoSymbol, | ||
326 | +}; | ||
327 | + | ||
328 | +static void | ||
329 | +EvdevKbdRead (int fd, void *closure) | ||
330 | +{ | ||
331 | + int i, n; | ||
332 | + struct input_event events[NUM_EVENTS]; | ||
333 | + | ||
334 | + n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event)); | ||
335 | + if (n <= 0) | ||
336 | + return; | ||
337 | + | ||
338 | + n /= sizeof (struct input_event); | ||
339 | + | ||
340 | + for (i = 0; i < n; i++) | ||
341 | + { | ||
342 | + if (events[i].type == EV_KEY) | ||
343 | + KdEnqueueKeyboardEvent (events[i].code, !events[i].value); | ||
344 | + } | ||
345 | +} | ||
346 | + | ||
347 | +static void | ||
348 | +EvdevKbdLoad (void) | ||
349 | +{ | ||
350 | + kdMinScanCode = 0; | ||
351 | + kdMaxScanCode = 193; | ||
352 | + kdKeymapWidth = 2; | ||
353 | + memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap)); | ||
354 | +} | ||
355 | + | ||
356 | +static int | ||
357 | +EvdevKbdInit (void) | ||
358 | +{ | ||
359 | + int fd, i; | ||
360 | + | ||
361 | + if (!EvdevInputType) | ||
362 | + EvdevInputType = KdAllocInputType (); | ||
363 | + | ||
364 | + if (!kdKeyboard) | ||
365 | + { | ||
366 | + for (i = 0; i < NUM_DEFAULT_EVDEV; i++) | ||
367 | + { | ||
368 | + fd = open (kdefaultEvdev[i], 2); | ||
369 | + if (fd >= 0) | ||
370 | + { | ||
371 | + kdKeyboard = KdSaveString (kdefaultEvdev[i]); | ||
372 | + break; | ||
373 | + } | ||
374 | + } | ||
375 | + } | ||
376 | + else | ||
377 | + { | ||
378 | + fd = open (kdKeyboard, O_RDWR); | ||
379 | + if (fd < 0) | ||
380 | + return FALSE; | ||
381 | + } | ||
382 | + | ||
383 | + if (ioctl (fd, EVIOCGRAB, 1) < 0) | ||
384 | + { | ||
385 | + close (fd); | ||
386 | + return FALSE; | ||
387 | + } | ||
388 | + | ||
389 | + if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL)) | ||
390 | + return FALSE; | ||
391 | + | ||
392 | + kbd_fd = fd; | ||
393 | + return TRUE; | ||
394 | +} | ||
395 | + | ||
396 | +static void | ||
397 | +EvdevKbdFini (void) | ||
398 | +{ | ||
399 | +} | ||
400 | + | ||
401 | +static void | ||
402 | +EvdevKbdLeds (int leds) | ||
403 | +{ | ||
404 | + struct input_event event; | ||
405 | + | ||
406 | + memset(&event, 0, sizeof(event)); | ||
407 | + | ||
408 | + event.type = EV_LED; | ||
409 | + event.code = LED_CAPSL; | ||
410 | + event.value = leds & (1 << 0) ? 1 : 0; | ||
411 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
412 | + | ||
413 | + event.type = EV_LED; | ||
414 | + event.code = LED_NUML; | ||
415 | + event.value = leds & (1 << 1) ? 1 : 0; | ||
416 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
417 | + | ||
418 | + event.type = EV_LED; | ||
419 | + event.code = LED_SCROLLL; | ||
420 | + event.value = leds & (1 << 2) ? 1 : 0; | ||
421 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
422 | + | ||
423 | + event.type = EV_LED; | ||
424 | + event.code = LED_COMPOSE; | ||
425 | + event.value = leds & (1 << 3) ? 1 : 0; | ||
426 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
427 | +} | ||
428 | + | ||
429 | +static void | ||
430 | +EvdevKbdBell (int volume, int frequency, int duration) | ||
431 | +{ | ||
432 | +} | ||
433 | + | ||
434 | KdKeyboardFuncs LinuxEvdevKeyboardFuncs = { | ||
435 | EvdevKbdLoad, | ||
436 | EvdevKbdInit, | ||
437 | @@ -296,4 +659,4 @@ | ||
438 | EvdevKbdFini, | ||
439 | 0, | ||
440 | }; | ||
441 | -#endif | ||
442 | + | ||
443 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.c xserver/hw/kdrive/src/kdrive.c | ||
444 | --- xserver.original/hw/kdrive/src/kdrive.c 2005-12-16 10:36:07.000000000 -0200 | ||
445 | +++ xserver/hw/kdrive/src/kdrive.c 2005-12-16 10:37:09.000000000 -0200 | ||
446 | @@ -73,6 +73,7 @@ | ||
447 | Bool kdEnabled; | ||
448 | int kdSubpixelOrder; | ||
449 | int kdVirtualTerminal = -1; | ||
450 | +char *kdKeyboard = 0; | ||
451 | Bool kdSwitchPending; | ||
452 | char *kdSwitchCmd; | ||
453 | DDXPointRec kdOrigin; | ||
454 | @@ -795,6 +796,14 @@ | ||
455 | UseMsg (); | ||
456 | return 2; | ||
457 | } | ||
458 | + if (!strcmp (argv[i], "-keyboard")) | ||
459 | + { | ||
460 | + if ((i+1) < argc) | ||
461 | + kdKeyboard = argv[i+1]; | ||
462 | + else | ||
463 | + UseMsg (); | ||
464 | + return 2; | ||
465 | + } | ||
466 | if (!strcmp (argv[i], "-rgba")) | ||
467 | { | ||
468 | if ((i+1) < argc) | ||
469 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.h xserver/hw/kdrive/src/kdrive.h | ||
470 | --- xserver.original/hw/kdrive/src/kdrive.h 2005-12-16 10:36:07.000000000 -0200 | ||
471 | +++ xserver/hw/kdrive/src/kdrive.h 2005-12-16 10:37:09.000000000 -0200 | ||
472 | @@ -416,6 +416,7 @@ | ||
473 | extern Bool kdDisableZaphod; | ||
474 | extern Bool kdDontZap; | ||
475 | extern int kdVirtualTerminal; | ||
476 | +extern char *kdKeyboard; | ||
477 | extern char *kdSwitchCmd; | ||
478 | extern KdOsFuncs *kdOsFuncs; | ||
479 | |||
480 | @@ -769,7 +770,7 @@ | ||
481 | ProcessInputEvents (void); | ||
482 | |||
483 | extern KdMouseFuncs LinuxMouseFuncs; | ||
484 | -extern KdMouseFuncs LinuxEvdevFuncs; | ||
485 | +extern KdMouseFuncs LinuxEvdevMouseFuncs; | ||
486 | extern KdMouseFuncs Ps2MouseFuncs; | ||
487 | extern KdMouseFuncs BusMouseFuncs; | ||
488 | extern KdMouseFuncs MsMouseFuncs; | ||
489 | @@ -777,6 +778,7 @@ | ||
490 | extern KdMouseFuncs TsFuncs; | ||
491 | #endif | ||
492 | extern KdKeyboardFuncs LinuxKeyboardFuncs; | ||
493 | +extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs; | ||
494 | extern KdOsFuncs LinuxFuncs; | ||
495 | |||
496 | extern KdMouseFuncs VxWorksMouseFuncs; | ||
497 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kinput.c xserver/hw/kdrive/src/kinput.c | ||
498 | --- xserver.original/hw/kdrive/src/kinput.c 2005-12-16 10:36:07.000000000 -0200 | ||
499 | +++ xserver/hw/kdrive/src/kinput.c 2005-12-16 10:37:09.000000000 -0200 | ||
500 | @@ -1300,6 +1300,7 @@ | ||
501 | xE.u.u.type = KeyPress; | ||
502 | xE.u.u.detail = key_code; | ||
503 | |||
504 | +#ifndef XKB | ||
505 | switch (KEYCOL1(key_code)) | ||
506 | { | ||
507 | case XK_Num_Lock: | ||
508 | @@ -1313,6 +1314,7 @@ | ||
509 | else | ||
510 | xE.u.u.type = KeyPress; | ||
511 | } | ||
512 | +#endif | ||
513 | |||
514 | /* | ||
515 | * Check pressed keys which are already down | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-use-evdev.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-use-evdev.patch new file mode 100644 index 0000000000..28d7325601 --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-use-evdev.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | --- xserver/hw/kdrive/fbdev/fbinit.c~ 2006-01-31 17:09:33.000000000 +0100 | ||
2 | +++ xserver/hw/kdrive/fbdev/fbinit.c 2006-01-31 17:11:55.000000000 +0100 | ||
3 | @@ -28,6 +28,8 @@ | ||
4 | #endif | ||
5 | #include <fbdev.h> | ||
6 | |||
7 | +extern int use_evdev; | ||
8 | + | ||
9 | void | ||
10 | InitCard (char *name) | ||
11 | { | ||
12 | @@ -45,7 +47,10 @@ | ||
13 | void | ||
14 | InitInput (int argc, char **argv) | ||
15 | { | ||
16 | - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); | ||
17 | + if (use_evdev) | ||
18 | + KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs); | ||
19 | + else | ||
20 | + KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); | ||
21 | #ifdef TOUCHSCREEN | ||
22 | KdAddMouseDriver (&TsFuncs); | ||
23 | #endif | ||
24 | --- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100 | ||
25 | +++ xserver/hw/kdrive/src/kdrive.c 2006-01-31 17:15:28.000000000 +0100 | ||
26 | @@ -44,6 +44,8 @@ | ||
27 | #include "dpmsproc.h" | ||
28 | #endif | ||
29 | |||
30 | +int use_evdev = 0; | ||
31 | + | ||
32 | typedef struct _kdDepths { | ||
33 | CARD8 depth; | ||
34 | CARD8 bpp; | ||
35 | @@ -687,6 +689,7 @@ | ||
36 | ErrorF("-videoTest Start the server, pause momentarily and exit\n"); | ||
37 | ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n"); | ||
38 | ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n"); | ||
39 | + ErrorF("-use-evdev Use Linux evdev input\n"); | ||
40 | ErrorF("-switchCmd Command to execute on vt switch\n"); | ||
41 | ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n"); | ||
42 | ErrorF("vtxx Use virtual terminal xx instead of the next available\n"); | ||
43 | @@ -796,6 +799,11 @@ | ||
44 | UseMsg (); | ||
45 | return 2; | ||
46 | } | ||
47 | + if (!strcmp (argv[i], "-use-evdev")) | ||
48 | + { | ||
49 | + use_evdev = 1; | ||
50 | + return 1; | ||
51 | + } | ||
52 | if (!strcmp (argv[i], "-keyboard")) | ||
53 | { | ||
54 | if ((i+1) < argc) | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kmode-palm.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kmode-palm.patch new file mode 100644 index 0000000000..255e707b55 --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kmode-palm.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | --- kmode.c 2006-05-03 19:48:42.000000000 +0200 | ||
2 | +++ xserver/hw/kdrive/src/kmode.c 2006-05-03 19:50:43.000000000 +0200 | ||
3 | @@ -32,6 +32,31 @@ | ||
4 | /* H V Hz KHz */ | ||
5 | /* FP BP BLANK POLARITY */ | ||
6 | |||
7 | + /* Treo 650 */ | ||
8 | + | ||
9 | + { 320, 320, 64, 16256, | ||
10 | + 17, 12, 32, KdSyncNegative, | ||
11 | + 1, 11, 14, KdSyncNegative, | ||
12 | + }, | ||
13 | + | ||
14 | + { 320, 320, 64, 0, | ||
15 | + 0, 0, 0, KdSyncNegative, | ||
16 | + 0, 0, 0, KdSyncNegative, | ||
17 | + }, | ||
18 | + | ||
19 | + /* LifeDrive/T3/TX modes */ | ||
20 | + | ||
21 | + { 320, 480, 64, 16256, | ||
22 | + 17, 12, 32, KdSyncNegative, | ||
23 | + 1, 11, 14, KdSyncNegative, | ||
24 | + }, | ||
25 | + | ||
26 | + { 480, 320, 64, 0, | ||
27 | + 0, 0, 0, KdSyncNegative, | ||
28 | + 0, 0, 0, KdSyncNegative, | ||
29 | + }, | ||
30 | + | ||
31 | + | ||
32 | /* IPAQ modeline: | ||
33 | * | ||
34 | * Modeline "320x240" 5.7222 320 337 340 352 240 241 244 254" | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kmode.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kmode.patch new file mode 100644 index 0000000000..5ad3e4e277 --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/kmode.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | --- /tmp/kmode.c 2005-06-27 14:46:19.716843288 +0200 | ||
2 | +++ xserver/hw/kdrive/src/kmode.c 2005-06-27 14:46:30.070269328 +0200 | ||
3 | @@ -41,6 +41,11 @@ | ||
4 | 1, 11, 14, KdSyncNegative, | ||
5 | }, | ||
6 | |||
7 | + { 240, 320, 64, 0, | ||
8 | + 0, 0, 0, KdSyncNegative, | ||
9 | + 0, 0, 0, KdSyncNegative, | ||
10 | + }, | ||
11 | + | ||
12 | /* Other VESA modes */ | ||
13 | { 640, 350, 85, 31500, /* VESA */ | ||
14 | 32, 96, 192, KdSyncPositive, /* 26.413 */ | ||
15 | @@ -80,6 +85,13 @@ | ||
16 | 16, 48, 160, KdSyncNegative, /* 31.469 */ | ||
17 | 10, 33, 45, KdSyncNegative, /* 59.940 */ | ||
18 | }, | ||
19 | + | ||
20 | + | ||
21 | + { 480, 640, 60, 0, /* VESA */ | ||
22 | + 0, 0, 0, KdSyncNegative, /* 31.469 */ | ||
23 | + 0, 0, 0, KdSyncNegative, /* 59.940 */ | ||
24 | + }, | ||
25 | + | ||
26 | |||
27 | /* 800x600 modes */ | ||
28 | { 800, 600, 85, 56250, /* VESA */ | ||
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/no-serial-probing.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/no-serial-probing.patch new file mode 100644 index 0000000000..35ccadaa8d --- /dev/null +++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/no-serial-probing.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | --- xserver/hw/kdrive/linux/mouse.c.orig 2004-05-13 14:25:51.000000000 -0700 | ||
2 | +++ xserver/hw/kdrive/linux/mouse.c 2005-09-22 12:20:47.000000000 -0700 | ||
3 | @@ -927,8 +927,10 @@ char *kdefaultMouse[] = { | ||
4 | "/dev/psaux", | ||
5 | "/dev/input/mice", | ||
6 | "/dev/adbmouse", | ||
7 | +#ifdef BREAK_MY_SERIAL_CONSOLE | ||
8 | "/dev/ttyS0", | ||
9 | "/dev/ttyS1", | ||
10 | +#endif | ||
11 | }; | ||
12 | |||
13 | #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0])) | ||