Magellan Linux

Contents of /trunk/xorg-old/patches-6.8.2-r10/9003_all_6.8.2-lnx-evdev-keyboard-dont-grab.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (show annotations) (download)
Tue May 8 20:58:51 2007 UTC (17 years ago) by niro
File size: 1703 byte(s)
-import

1 diff -urw xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c
2 --- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c 2005-02-20 01:11:05.000000000 -0600
3 +++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c 2005-02-20 11:01:00.000000000 -0600
4 @@ -717,7 +717,7 @@
5 {
6 KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
7 evdevKbdPtr evdevKbd = (evdevKbdPtr) pKbd->private;
8 - unsigned long mask;
9 +/* unsigned long mask; */
10
11 if ((pInfo->fd = evdevGetFDForDriver (&evdevKbd->evdev)) == -1) {
12 xf86Msg(X_ERROR, "%s: cannot open input device (name: '%s', phys: '%s')\n", pInfo->name, evdevKbd->evdev.name, evdevKbd->evdev.phys);
13 @@ -726,6 +726,10 @@
14 /*
15 * Grab the keyboard for ourselves.
16 */
17 + /* XXX The EVIOCGMASK ioctl has disappeared, at least from 2.6.10 kernels.
18 + * Is grabbing then unnecessary?
19 + */
20 + /*
21 if (ioctl(pInfo->fd, EVIOCGMASK, &mask) < 0) {
22 xf86Msg(X_INFO, "%s: unable to use input device masking '%s', trying grabbing.\n", pInfo->name, strerror(errno));
23 if (ioctl(pInfo->fd, EVIOCGRAB, 1) < 0) {
24 @@ -742,7 +746,7 @@
25 mask |= BIT(2);
26 ioctl(pInfo->fd, EVIOCSDMASK, mask);
27 xf86Msg(X_INFO, "%s: Using input device masking.\n", pInfo->name);
28 -
29 + */
30 return Success;
31 }
32
33 @@ -750,13 +754,16 @@
34 evdevKbdOff(InputInfoPtr pInfo, int what)
35 {
36 if (pInfo->fd != -1) {
37 + /* XXX Masking is no more; see above */
38 +
39 + /*
40 unsigned long mask;
41
42 if (ioctl(pInfo->fd, EVIOCGDMASK, &mask) >= 0) {
43 mask |= BIT(0);
44 ioctl(pInfo->fd, EVIOCSDMASK, mask);
45 }
46 -
47 + */
48 close (pInfo->fd);
49 pInfo->fd = -1;
50 }