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

Unified Diff: ash/wm/maximize_mode/internal_input_device_list_x11.cc

Issue 294033016: Fix crash on key events in touchview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check for non GenericEvent event type. Created 6 years, 7 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/internal_input_device_list_x11.cc
diff --git a/ash/wm/maximize_mode/internal_input_device_list_x11.cc b/ash/wm/maximize_mode/internal_input_device_list_x11.cc
index 9a490ec6197f9f3c30f4e87003e7eb177e7de531..8753f8259de932def03c1db588ebc14bce7ec559 100644
--- a/ash/wm/maximize_mode/internal_input_device_list_x11.cc
+++ b/ash/wm/maximize_mode/internal_input_device_list_x11.cc
@@ -44,8 +44,11 @@ InternalInputDeviceListX11::~InternalInputDeviceListX11() {
bool InternalInputDeviceListX11::IsEventFromInternalDevice(
const ui::Event* event) {
- if (!event->HasNativeEvent())
+ if (!event->HasNativeEvent() ||
+ event->native_event()->type != GenericEvent) {
return false;
+ }
+
XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(
event->native_event()->xcookie.data);
return internal_device_ids_.find(xiev->sourceid) !=
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698