summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2009-05-16 20:06:45 +0200
committerHenrik Rydberg <rydberg@euromail.se>2009-05-16 20:06:45 +0200
commitecb6a617cc0af69fd4733d9095a5cff842b8e552 (patch)
treecb7f1a5fd88c7493bafe3fbd35c03dbbd29448e9 /src
parent47ea8a0de5d2511ebc39151b1d428d5e4985b726 (diff)
trailing whitespace
Diffstat (limited to 'src')
-rw-r--r--src/capabilities.c13
-rw-r--r--src/multitouch.c2
2 files changed, 8 insertions, 7 deletions
diff --git a/src/capabilities.c b/src/capabilities.c
index a0655c8..7f8a8f7 100644
--- a/src/capabilities.c
+++ b/src/capabilities.c
@@ -38,7 +38,7 @@ int read_capabilities(struct Capabilities *cap, int fd)
int rc;
memset(cap, 0, sizeof(struct Capabilities));
-
+
SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_SYN, sizeof(evbits)), evbits));
if (rc < 0)
return rc;
@@ -52,7 +52,6 @@ int read_capabilities(struct Capabilities *cap, int fd)
cap->has_left = getbit(keybits, BTN_LEFT);
cap->has_middle = getbit(keybits, BTN_MIDDLE);
cap->has_right = getbit(keybits, BTN_RIGHT);
- cap->has_mtdata = getbit(keybits, BTN_MT_REPORT_PACKET);
SETABS(cap, touch_major, absbits, ABS_MT_TOUCH_MAJOR, fd);
SETABS(cap, touch_minor, absbits, ABS_MT_TOUCH_MINOR, fd);
@@ -62,6 +61,8 @@ int read_capabilities(struct Capabilities *cap, int fd)
SETABS(cap, position_x, absbits, ABS_MT_POSITION_X, fd);
SETABS(cap, position_y, absbits, ABS_MT_POSITION_Y, fd);
+ cap->has_mtdata = cap->has_position_x && cap->has_position_y;
+
return 0;
}
@@ -90,19 +91,19 @@ void output_capabilities(const struct Capabilities *cap)
if (cap->has_width_major)
xf86Msg(X_INFO, "multitouch: width: %d %d\n",
cap->abs_width_major.minimum,
- cap->abs_width_major.maximum);
+ cap->abs_width_major.maximum);
if (cap->has_orientation)
xf86Msg(X_INFO, "multitouch: orientation: %d %d\n",
cap->abs_orientation.minimum,
- cap->abs_orientation.maximum);
+ cap->abs_orientation.maximum);
if (cap->has_position_x)
xf86Msg(X_INFO, "multitouch: position_x: %d %d\n",
cap->abs_position_x.minimum,
- cap->abs_position_x.maximum);
+ cap->abs_position_x.maximum);
if (cap->has_position_y)
xf86Msg(X_INFO, "multitouch: position_y: %d %d\n",
cap->abs_position_y.minimum,
- cap->abs_position_y.maximum);
+ cap->abs_position_y.maximum);
}
////////////////////////////////////////////////////////
diff --git a/src/multitouch.c b/src/multitouch.c
index 93c6339..99807b9 100644
--- a/src/multitouch.c
+++ b/src/multitouch.c
@@ -194,7 +194,7 @@ static InputInfoPtr preinit(InputDriverPtr drv, IDevPtr dev, int flags)
local->private = mt;
local->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
local->conf_idev = dev;
-
+
xf86CollectInputOptions(local, NULL, NULL);
//xf86OptionListReport(local->options);
xf86ProcessCommonOptions(local, local->options);