Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1549)

Unified Diff: ui/events/ozone/evdev/touch_event_converter.cc

Issue 58473003: evdev: Fix crashing with touch devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/touch_event_converter.cc
diff --git a/ui/events/ozone/evdev/touch_event_converter.cc b/ui/events/ozone/evdev/touch_event_converter.cc
index 70752baf6a3b355e8bc0aff150af37adc66ebcf7..d95ebb6c5279dd649a03140ca5bbe8947b5f2d22 100644
--- a/ui/events/ozone/evdev/touch_event_converter.cc
+++ b/ui/events/ozone/evdev/touch_event_converter.cc
@@ -146,7 +146,7 @@ void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
altered_slots_.set(current_slot_);
break;
default:
- NOTREACHED();
+ NOTREACHED() << "invalid code for EV_ABS: " << input.code;
}
} else if (input.type == EV_SYN) {
switch (input.code) {
@@ -178,11 +178,18 @@ void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
case SYN_MT_REPORT:
case SYN_CONFIG:
case SYN_DROPPED:
- NOTREACHED() << "SYN_MT events not supported.";
+ NOTREACHED() << "invalid code for EV_SYN: " << input.code;
break;
}
+ } else if (input.type == EV_KEY) {
rjkroege 2013/11/04 23:39:46 it is possible to get key events on the touchscree
spang 2013/11/05 00:10:02 Yes it happens. Only the BTN_TOUCH "key".
+ switch (input.code) {
+ case BTN_TOUCH:
+ break;
+ default:
+ NOTREACHED() << "invalid code for EV_KEY: " << input.code;
+ }
} else {
- NOTREACHED();
+ NOTREACHED() << "invalid type: " << input.type;
}
}
}
« ui/events/ozone/evdev/event_device_info.cc ('K') | « ui/events/ozone/evdev/event_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698