Merge lp:~oif-team/grail/trunk.v1.0.15 into lp:grail

Proposed by Henrik Rydberg
Status: Superseded
Proposed branch: lp:~oif-team/grail/trunk.v1.0.15
Merge into: lp:grail
Diff against target: 50 lines (+16/-8)
2 files modified
configure.ac (+1/-1)
src/touch-caps.c (+15/-7)
To merge this branch: bzr merge lp:~oif-team/grail/trunk.v1.0.15
Reviewer Review Type Date Requested Status
Open Input Framework Team Pending
Review via email: mp+36825@code.launchpad.net

This proposal has been superseded by a proposal from 2010-09-28.

Description of the change

This is a proposed bugfix for LP 647761. The idea is simply to not use grail for any device with relative axes. This includes the magic mouse, but any other devices you could think of that would be affected by this change?

To post a comment you must log in.
lp:~oif-team/grail/trunk.v1.0.15 updated
97. By Henrik Rydberg

Only support pure absolute devices at this time

There are some hybrid relative/absolute devices out there, like
the magic mouse, for which special behavior, outside the current
scope of grail, is expected. This patch disables grail for those
devices.

98. By Henrik Rydberg

grail v1.0.15

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2010-09-21 11:27:20 +0000
3+++ configure.ac 2010-09-28 09:35:51 +0000
4@@ -1,7 +1,7 @@
5 # Initialize Autoconf
6 AC_PREREQ([2.60])
7 AC_INIT([Gesture Recognition And Instantiation Library],
8- [1.0.14],
9+ [1.0.15],
10 [],
11 [utouch-grail])
12 AC_CONFIG_SRCDIR([Makefile.am])
13
14=== modified file 'src/touch-caps.c'
15--- src/touch-caps.c 2010-09-10 12:00:27 +0000
16+++ src/touch-caps.c 2010-09-28 09:35:51 +0000
17@@ -48,18 +48,26 @@
18 {
19 unsigned long keybits[nlongs(KEY_MAX)];
20 unsigned long absbits[nlongs(ABS_MAX)];
21+ unsigned long relbits[nlongs(REL_CNT)];
22 int rc;
23
24+ SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits));
25+ if (rc < 0)
26+ return 0;
27+ SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits));
28+ if (rc < 0)
29+ return 0;
30+ SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_REL, sizeof(relbits)), relbits));
31+ if (rc < 0)
32+ return 0;
33+
34+ /* only support pure absolute devices at this time */
35+ if (getbit(relbits, REL_X) || getbit(relbits, REL_Y))
36+ return 0;
37+
38 if (dev->mtdev.caps.has_mtdata)
39 return 1;
40
41- SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits));
42- if (rc < 0)
43- return 0;
44- SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits));
45- if (rc < 0)
46- return 0;
47-
48 return getbit(absbits, ABS_X) &&
49 getbit(absbits, ABS_Y) &&
50 getbit(keybits, BTN_TOUCH) &&

Subscribers

People subscribed via source and target branches

to all changes: