summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMatthew Allum <mallum@polystyrene.(none)>2006-07-08 21:13:52 +0100
committerMatthew Allum <mallum@polystyrene.(none)>2006-07-08 21:13:52 +0100
commit21e3e3ca298dce22e5fad6ef38aa6fe9736a1d3b (patch)
tree62717ed8ef8e761df454d645ae46037bdfd78774 /hw
parente8056218944e873135c93039d1e9646d51364467 (diff)
parent39b2f7b2182aedb1ab45415efb4c263012ace512 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/dixmods/Makefile.am1
-rw-r--r--hw/xfree86/dixmods/xkbPrivate.c8
-rw-r--r--hw/xfree86/os-support/linux/lnx_io.c38
-rw-r--r--hw/xfree86/os-support/linux/lnx_kbd.c38
4 files changed, 15 insertions, 70 deletions
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index d1b806a7e..9023a0cb0 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -95,6 +95,7 @@ libtype1_la_SOURCES = type1mod.c
libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
+libxorgxkb_la_LIBADD = $(top_builddir)/dix/libdix.la
libxtrap_la_LDFLAGS = -avoid-version
libxtrap_la_LIBADD = $(top_builddir)/XTrap/libxtrap.la
diff --git a/hw/xfree86/dixmods/xkbPrivate.c b/hw/xfree86/dixmods/xkbPrivate.c
index 0479bcac3..b986432d5 100644
--- a/hw/xfree86/dixmods/xkbPrivate.c
+++ b/hw/xfree86/dixmods/xkbPrivate.c
@@ -26,13 +26,13 @@ XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
if (xf86act->type == XkbSA_XFree86Private) {
memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
msgbuf[XkbAnyActionDataSize]= '\0';
- if (strcmp(msgbuf, "-vmode")==0)
+ if (strcasecmp(msgbuf, "-vmode")==0)
xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
- else if (strcmp(msgbuf, "+vmode")==0)
+ else if (strcasecmp(msgbuf, "+vmode")==0)
xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
- else if (strcmp(msgbuf, "ungrab")==0)
+ else if (strcasecmp(msgbuf, "ungrab")==0)
xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
- else if (strcmp(msgbuf, "clsgrb")==0)
+ else if (strcasecmp(msgbuf, "clsgrb")==0)
xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
else
xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf);
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c
index 32f660108..eb8cd537e 100644
--- a/hw/xfree86/os-support/linux/lnx_io.c
+++ b/hw/xfree86/os-support/linux/lnx_io.c
@@ -67,25 +67,6 @@ xf86GetKbdLeds()
return(leds);
}
-/* kbd rate stuff based on kbdrate.c from Rik Faith <faith@cs.unc.edu> et.al.
- * from util-linux-2.9t package */
-
-#include <linux/kd.h>
-#include <linux/version.h>
-#ifdef __sparc__
-#include <asm/param.h>
-#include <asm/kbio.h>
-#endif
-
-/* Deal with spurious kernel header change in struct kbd_repeat.
- We undo this define after the routine using that struct is over,
- so as not to interfere with other 'rate' elements. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# define rate period
-# endif
-#endif
-
static int
KDKBDREP_ioctl_ok(int rate, int delay) {
#if defined(KDKBDREP) && !defined(__sparc__)
@@ -94,18 +75,18 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
struct kbd_repeat kbdrep_s;
/* don't change, just test */
- kbdrep_s.rate = -1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = -1;
kbdrep_s.delay = -1;
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
}
/* do the change */
if (rate == 0) /* switch repeat off */
- kbdrep_s.rate = 0;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 0;
else
- kbdrep_s.rate = 10000 / rate; /* convert cps to msec */
- if (kbdrep_s.rate < 1)
- kbdrep_s.rate = 1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 10000 / rate; /* convert cps to msec */
+ if (kbdrep_s.LNX_KBD_PERIOD_NAME < 1)
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 1;
kbdrep_s.delay = delay;
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
@@ -120,15 +101,6 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
#endif /* KDKBDREP */
}
-#undef rate
-
-/* Undo the earlier define for the struct kbd_repeat problem. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# undef rate
-# endif
-#endif
-
static int
KIOCSRATE_ioctl_ok(int rate, int delay) {
#ifdef KIOCSRATE
diff --git a/hw/xfree86/os-support/linux/lnx_kbd.c b/hw/xfree86/os-support/linux/lnx_kbd.c
index 504c52710..2912f1699 100644
--- a/hw/xfree86/os-support/linux/lnx_kbd.c
+++ b/hw/xfree86/os-support/linux/lnx_kbd.c
@@ -97,25 +97,6 @@ GetKbdLeds(InputInfoPtr pInfo)
return(leds);
}
-/* kbd rate stuff based on kbdrate.c from Rik Faith <faith@cs.unc.edu> et.al.
- * from util-linux-2.9t package */
-
-#include <linux/kd.h>
-#include <linux/version.h>
-#ifdef __sparc__
-#include <asm/param.h>
-#include <asm/kbio.h>
-#endif
-
-/* Deal with spurious kernel header change in struct kbd_repeat.
- We undo this define after the routine using that struct is over,
- so as not to interfere with other 'rate' elements. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# define rate period
-# endif
-#endif
-
static int
KDKBDREP_ioctl_ok(int rate, int delay) {
#if defined(KDKBDREP) && !defined(__sparc__)
@@ -124,7 +105,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
struct kbd_repeat kbdrep_s;
/* don't change, just test */
- kbdrep_s.rate = -1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = -1;
kbdrep_s.delay = -1;
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
@@ -132,11 +113,11 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
/* do the change */
if (rate == 0) /* switch repeat off */
- kbdrep_s.rate = 0;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 0;
else
- kbdrep_s.rate = 10000 / rate; /* convert cps to msec */
- if (kbdrep_s.rate < 1)
- kbdrep_s.rate = 1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 10000 / rate; /* convert cps to msec */
+ if (kbdrep_s.LNX_KBD_PERIOD_NAME < 1)
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 1;
kbdrep_s.delay = delay;
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
@@ -151,15 +132,6 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
#endif /* KDKBDREP */
}
-#undef rate
-
-/* Undo the earlier define for the struct kbd_repeat problem. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# undef rate
-# endif
-#endif
-
static int
KIOCSRATE_ioctl_ok(int rate, int delay) {
#ifdef KIOCSRATE