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

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: 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..f97b44ba8f19b3a0ec0a671292ecb606cf6fdfad 100644
--- a/ash/wm/maximize_mode/internal_input_device_list_x11.cc
+++ b/ash/wm/maximize_mode/internal_input_device_list_x11.cc
@@ -44,7 +44,9 @@ InternalInputDeviceListX11::~InternalInputDeviceListX11() {
bool InternalInputDeviceListX11::IsEventFromInternalDevice(
const ui::Event* event) {
- if (!event->HasNativeEvent())
+ // Key events are currently not XI2 events so we can't check the source device
+ // id and assume not internal.
+ if (event->IsKeyEvent() || !event->HasNativeEvent())
return false;
XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(
sadrul 2014/05/23 17:21:57 CHECK that event->native_event()->type == GenericE
sadrul 2014/05/23 17:22:34 s/CHECK/Check/, as in, early return if not Generic
flackr 2014/05/23 17:30:28 Done.
event->native_event()->xcookie.data);
« 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