kdrive/tslib: remove vendor-specific hacks
Parts of the KDrive merge accidentally contained a bunch of vendor-specific hacks; sorry.
This commit is contained in:
parent
8884a73a3f
commit
99378b58db
|
@ -75,10 +75,7 @@ TsRead (int fd, void *closure)
|
||||||
|
|
||||||
while (ts_read(private->tsDev, &event, 1) == 1) {
|
while (ts_read(private->tsDev, &event, 1) == 1) {
|
||||||
if (event.pressure) {
|
if (event.pressure) {
|
||||||
if (event.pressure > pi->dixdev->absolute->button_threshold)
|
flags = KD_BUTTON_1;
|
||||||
flags = KD_BUTTON_8;
|
|
||||||
else
|
|
||||||
flags = KD_BUTTON_1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Here we test for the touch screen driver actually being on the
|
* Here we test for the touch screen driver actually being on the
|
||||||
|
@ -113,9 +110,8 @@ TsRead (int fd, void *closure)
|
||||||
static Status
|
static Status
|
||||||
TslibEnable (KdPointerInfo *pi)
|
TslibEnable (KdPointerInfo *pi)
|
||||||
{
|
{
|
||||||
struct TslibPrivate *private = pi->driverPrivate;
|
struct TslibPrivate *private = pi->driverPrivate;
|
||||||
|
|
||||||
private->holdThumbEvents = 1;
|
|
||||||
private->raw_event_hook = NULL;
|
private->raw_event_hook = NULL;
|
||||||
private->raw_event_closure = NULL;
|
private->raw_event_closure = NULL;
|
||||||
private->tsDev = ts_open(pi->path, 0);
|
private->tsDev = ts_open(pi->path, 0);
|
||||||
|
@ -126,9 +122,6 @@ TslibEnable (KdPointerInfo *pi)
|
||||||
close(private->fd);
|
close(private->fd);
|
||||||
return BadAlloc;
|
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);
|
KdRegisterFd(private->fd, TsRead, pi);
|
||||||
|
|
||||||
|
@ -141,12 +134,12 @@ TslibDisable (KdPointerInfo *pi)
|
||||||
{
|
{
|
||||||
struct TslibPrivate *private = pi->driverPrivate;
|
struct TslibPrivate *private = pi->driverPrivate;
|
||||||
|
|
||||||
if (private->fd) {
|
if (private->fd)
|
||||||
KdUnregisterFd(pi, private->fd);
|
KdUnregisterFd(pi, private->fd, TRUE);
|
||||||
close(private->fd);
|
|
||||||
}
|
|
||||||
if (private->tsDev)
|
if (private->tsDev)
|
||||||
ts_close(private->tsDev);
|
ts_close(private->tsDev);
|
||||||
|
|
||||||
private->fd = 0;
|
private->fd = 0;
|
||||||
private->tsDev = NULL;
|
private->tsDev = NULL;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +149,6 @@ static Status
|
||||||
TslibInit (KdPointerInfo *pi)
|
TslibInit (KdPointerInfo *pi)
|
||||||
{
|
{
|
||||||
int fd = 0, i = 0;
|
int fd = 0, i = 0;
|
||||||
char devpath[PATH_MAX], devname[TS_NAME_SIZE];
|
|
||||||
DIR *inputdir = NULL;
|
DIR *inputdir = NULL;
|
||||||
struct dirent *inputent = NULL;
|
struct dirent *inputent = NULL;
|
||||||
struct tsdev *tsDev = NULL;
|
struct tsdev *tsDev = NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user