aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/linux/evdev.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/kdrive/linux/evdev.c
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
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);