aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/linux/evdev.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/hw/kdrive/linux/evdev.c
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/hw/kdrive/linux/evdev.c')
-rw-r--r--xorg-server/hw/kdrive/linux/evdev.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/xorg-server/hw/kdrive/linux/evdev.c b/xorg-server/hw/kdrive/linux/evdev.c
index 4ccd82239..f6017ba51 100644
--- a/xorg-server/hw/kdrive/linux/evdev.c
+++ b/xorg-server/hw/kdrive/linux/evdev.c
@@ -23,7 +23,6 @@
#ifdef HAVE_CONFIG_H
#include <kdrive-config.h>
#endif
-#define NEED_EVENTS
#include <errno.h>
#include <linux/input.h>
#include <X11/X.h>
@@ -210,7 +209,7 @@ EvdevPtrInit (KdPointerInfo *pi)
for (i = 0; i < NUM_DEFAULT_EVDEV; i++) {
fd = open (kdefaultEvdev[i], 2);
if (fd >= 0) {
- pi->path = KdSaveString (kdefaultEvdev[i]);
+ pi->path = strdup (kdefaultEvdev[i]);
break;
}
}
@@ -225,7 +224,7 @@ EvdevPtrInit (KdPointerInfo *pi)
close(fd);
- pi->name = KdSaveString("Evdev mouse");
+ pi->name = strdup("Evdev mouse");
return Success;
}
@@ -234,6 +233,8 @@ static Status
EvdevPtrEnable (KdPointerInfo *pi)
{
int fd;
+ unsigned long ev[NBITS(EV_MAX)];
+ Kevdev *ke;
if (!pi || !pi->path)
return BadImplementation;
@@ -242,8 +243,6 @@ EvdevPtrEnable (KdPointerInfo *pi)
if (fd < 0)
return BadMatch;
- unsigned long ev[NBITS(EV_MAX)];
- Kevdev *ke;
if (ioctl (fd, EVIOCGBIT(0 /*EV*/, sizeof (ev)), ev) < 0)
{
@@ -353,18 +352,11 @@ EvdevPtrFini (KdPointerInfo *pi)
static void
readMapping (KdKeyboardInfo *ki)
{
- int minScanCode, maxScanCode;
-
if (!ki)
return;
- minScanCode = 0;
- maxScanCode = 193;
-
- ki->keySyms.mapWidth = 2;
-
- ki->minScanCode = minScanCode;
- ki->maxScanCode = maxScanCode;
+ ki->minScanCode = 0;
+ ki->maxScanCode = 193;
}
static void
@@ -412,7 +404,7 @@ EvdevKbdInit (KdKeyboardInfo *ki)
close (fd);
- ki->name = KdSaveString("Evdev keyboard");
+ ki->name = strdup("Evdev keyboard");
readMapping(ki);