diff options
| author | Jeff Brown <jeffbrown@google.com> | 2010-12-23 17:50:18 -0800 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2010-12-29 13:19:53 -0800 |
| commit | 83c09685f2e62bc3cf7e71bc61d903f4b9ccaeb4 (patch) | |
| tree | c8bc2824e0d2e2b353b3d16ecf5836ab8fd9e67c /libs/ui/EventHub.cpp | |
| parent | dd830c21149c336139b28560c0e6fba9f3d0e0fc (diff) | |
| download | frameworks_base-83c09685f2e62bc3cf7e71bc61d903f4b9ccaeb4.zip frameworks_base-83c09685f2e62bc3cf7e71bc61d903f4b9ccaeb4.tar.gz frameworks_base-83c09685f2e62bc3cf7e71bc61d903f4b9ccaeb4.tar.bz2 | |
Add initial support for cursor-based pointing devices.
Some parts stubbed out but you can plug in a mouse and move
a green cursor around to interact with the UI.
Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
Diffstat (limited to 'libs/ui/EventHub.cpp')
| -rw-r--r-- | libs/ui/EventHub.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp index 8f4bac6..4e9fad0 100644 --- a/libs/ui/EventHub.cpp +++ b/libs/ui/EventHub.cpp @@ -755,14 +755,14 @@ int EventHub::openDevice(const char *devicePath) { } } - // See if this is a trackball (or mouse). + // See if this is a cursor device such as a trackball or mouse. if (test_bit(BTN_MOUSE, key_bitmask)) { uint8_t rel_bitmask[sizeof_bit_array(REL_MAX + 1)]; memset(rel_bitmask, 0, sizeof(rel_bitmask)); LOGV("Getting relative controllers..."); if (ioctl(fd, EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask) >= 0) { if (test_bit(REL_X, rel_bitmask) && test_bit(REL_Y, rel_bitmask)) { - device->classes |= INPUT_DEVICE_CLASS_TRACKBALL; + device->classes |= INPUT_DEVICE_CLASS_CURSOR; } } } |
