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

Unified Diff: ui/events/x/events_x.cc

Issue 400893003: Revert of Support XI2 in PlatformKeycodeFromNative() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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: ui/events/x/events_x.cc
diff --git a/ui/events/x/events_x.cc b/ui/events/x/events_x.cc
index c9aecd1900347d2a22ff7bc78986746324b6ed74..03b7e28d8de9704453e90d7dde5a6e126667863b 100644
--- a/ui/events/x/events_x.cc
+++ b/ui/events/x/events_x.cc
@@ -579,36 +579,8 @@
}
uint32 PlatformKeycodeFromNative(const base::NativeEvent& native_event) {
- XKeyEvent* xkey = NULL;
- XEvent xkey_from_xi2;
- switch (native_event->type) {
- case KeyPress:
- case KeyRelease:
- xkey = &native_event->xkey;
- break;
- case GenericEvent: {
- XIDeviceEvent* xievent =
- static_cast<XIDeviceEvent*>(native_event->xcookie.data);
- switch (xievent->evtype) {
- case XI_KeyPress:
- case XI_KeyRelease:
- // Build an XKeyEvent corresponding to the XI2 event,
- // so that we can call XLookupString on it.
- InitXKeyEventFromXIDeviceEvent(*native_event, &xkey_from_xi2);
- xkey = &xkey_from_xi2.xkey;
- break;
- default:
- NOTREACHED();
- break;
- }
- }
- default:
- NOTREACHED();
- break;
- }
- KeySym keysym = XK_VoidSymbol;
- if (xkey)
- XLookupString(xkey, NULL, 0, &keysym, NULL);
+ KeySym keysym;
+ XLookupString(&native_event->xkey, NULL, 0, &keysym, NULL);
return keysym;
}
« 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