summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-11-27 22:22:33 +0200
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-12-06 23:24:24 +0200
commit99378b58dbc63160382ad9c41f9cb0dd2a24e9d1 (patch)
tree00bf45d0ee8425383bfb080ab3abd9c3618e5805 /hw
parent8884a73a3f4efa8276c5e38b9573201574c4f1f6 (diff)
kdrive/tslib: remove vendor-specific hacks
Parts of the KDrive merge accidentally contained a bunch of vendor-specific hacks; sorry.
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/linux/tslib.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c
index 44b4b5413..41b74fabd 100644
--- a/hw/kdrive/linux/tslib.c
+++ b/hw/kdrive/linux/tslib.c
@@ -75,10 +75,7 @@ TsRead (int fd, void *closure)
while (ts_read(private->tsDev, &event, 1) == 1) {
if (event.pressure) {
- if (event.pressure > pi->dixdev->absolute->button_threshold)
- flags = KD_BUTTON_8;
- else
- flags = KD_BUTTON_1;
+ flags = KD_BUTTON_1;
/*
* Here we test for the touch screen driver actually being on the
@@ -113,9 +110,8 @@ TsRead (int fd, void *closure)
static Status
TslibEnable (KdPointerInfo *pi)
{
- struct TslibPrivate *private = pi->driverPrivate;
+ struct TslibPrivate *private = pi->driverPrivate;
- private->holdThumbEvents = 1;
private->raw_event_hook = NULL;
private->raw_event_closure = NULL;
private->tsDev = ts_open(pi->path, 0);
@@ -126,9 +122,6 @@ TslibEnable (KdPointerInfo *pi)
close(private->fd);
return BadAlloc;
}
- if (pi->dixdev && pi->dixdev->absolute &&
- pi->dixdev->absolute->button_threshold == 0)
- pi->dixdev->absolute->button_threshold = 115;
KdRegisterFd(private->fd, TsRead, pi);
@@ -141,12 +134,12 @@ TslibDisable (KdPointerInfo *pi)
{
struct TslibPrivate *private = pi->driverPrivate;
- if (private->fd) {
- KdUnregisterFd(pi, private->fd);
- close(private->fd);
- }
+ if (private->fd)
+ KdUnregisterFd(pi, private->fd, TRUE);
+
if (private->tsDev)
ts_close(private->tsDev);
+
private->fd = 0;
private->tsDev = NULL;
}
@@ -156,7 +149,6 @@ static Status
TslibInit (KdPointerInfo *pi)
{
int fd = 0, i = 0;
- char devpath[PATH_MAX], devname[TS_NAME_SIZE];
DIR *inputdir = NULL;
struct dirent *inputent = NULL;
struct tsdev *tsDev = NULL;