summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-23 02:55:41 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-23 02:55:41 +0300
commit57f98e2b72d5c7fea93a9f6da86228ffb4856bf3 (patch)
tree55e827b1920fd32460a608edd35cc91fc9cac140 /hw/kdrive
parenta6dc629052f0ad509cfa30e98217043a63c09552 (diff)
kdrive/tslib: port to new absolute API, remove debugging
Port to new absolute device (not touchscreen) API, and remove some leftover debugging.
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/linux/tslib.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c
index bf2a3db51..44b4b5413 100644
--- a/hw/kdrive/linux/tslib.c
+++ b/hw/kdrive/linux/tslib.c
@@ -74,11 +74,8 @@ TsRead (int fd, void *closure)
}
while (ts_read(private->tsDev, &event, 1) == 1) {
-#ifdef DEBUG
- ErrorF("[tslib] originally from (%d, %d)\n", event.x, event.y);
-#endif
if (event.pressure) {
- if (event.pressure > pi->dixdev->touchscreen->button_threshold)
+ if (event.pressure > pi->dixdev->absolute->button_threshold)
flags = KD_BUTTON_8;
else
flags = KD_BUTTON_1;
@@ -109,9 +106,6 @@ TsRead (int fd, void *closure)
y = private->lasty;
}
-#ifdef DEBUG
- ErrorF("event at (%lu, %lu), pressure is %d, sending flags %lu\n", x, y, event.pressure, flags);
-#endif
KdEnqueuePointerEvent (pi, flags, x, y, event.pressure);
}
}
@@ -132,13 +126,9 @@ TslibEnable (KdPointerInfo *pi)
close(private->fd);
return BadAlloc;
}
- if (pi->dixdev && pi->dixdev->touchscreen &&
- pi->dixdev->touchscreen->button_threshold == 0)
- pi->dixdev->touchscreen->button_threshold = 115;
-
-#ifdef DEBUG
- ErrorF("[tslib/TslibEnable] successfully enabled %s\n", pi->path);
-#endif
+ if (pi->dixdev && pi->dixdev->absolute &&
+ pi->dixdev->absolute->button_threshold == 0)
+ pi->dixdev->absolute->button_threshold = 115;
KdRegisterFd(private->fd, TsRead, pi);
@@ -186,9 +176,6 @@ TslibInit (KdPointerInfo *pi)
pi->nAxes = 3;
pi->name = KdSaveString("Touchscreen");
pi->inputClass = KD_TOUCHSCREEN;
-#ifdef DEBUG
- ErrorF("[tslib/TslibInit] successfully inited for device %s\n", pi->path);
-#endif
return Success;
}