summaryrefslogtreecommitdiffstats
path: root/views/touchui
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-17 15:29:51 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-17 15:29:51 +0000
commitb9b1e7a4fa49c108c40536cee59ce0b2b0a09d86 (patch)
treeb8d8f83119b439d3656d540baa91baae12464f40 /views/touchui
parent2180ba95f998a4a414d2aed0b644079739242aaa (diff)
downloadchromium_src-b9b1e7a4fa49c108c40536cee59ce0b2b0a09d86.zip
chromium_src-b9b1e7a4fa49c108c40536cee59ce0b2b0a09d86.tar.gz
chromium_src-b9b1e7a4fa49c108c40536cee59ce0b2b0a09d86.tar.bz2
Makes Transform concrete. Fixes bug in coordinate conversion and makes all conversion routines calculate the transform in the same way. Lastly fixes bug in touch_factory.cc that was causing crashes on my machine when running views_unittests. Oh, and adds some tests of conversion methods.
BUG=none TEST=none R=ben@chromium.org,sadrul@chromium.org Review URL: http://codereview.chromium.org/7033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85635 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/touchui')
-rw-r--r--views/touchui/touch_factory.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/views/touchui/touch_factory.cc b/views/touchui/touch_factory.cc
index fefe35f..dcf88c8 100644
--- a/views/touchui/touch_factory.cc
+++ b/views/touchui/touch_factory.cc
@@ -179,10 +179,12 @@ void TouchFactory::UpdateDeviceList(Display* display) {
touch_device_list_.clear();
XDeviceInfo* devlist = XListInputDevices(display, &count);
for (int i = 0; i < count; i++) {
- const char* devtype = XGetAtomName(display, devlist[i].type);
- if (devtype && !strcmp(devtype, XI_TOUCHSCREEN)) {
- touch_device_lookup_[devlist[i].id] = true;
- touch_device_list_.push_back(devlist[i].id);
+ if (devlist[i].type) {
+ const char* devtype = XGetAtomName(display, devlist[i].type);
+ if (devtype && !strcmp(devtype, XI_TOUCHSCREEN)) {
+ touch_device_lookup_[devlist[i].id] = true;
+ touch_device_list_.push_back(devlist[i].id);
+ }
}
}
if (devlist)