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

Unified Diff: ui/aura/window_tree_host_x11.cc

Issue 336403005: Use XInput2 events for keyboard events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments (sadrul) 3 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 | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/events/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host_x11.cc
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index 083b6ad3e689bc95219c920e51258690c917f3b4..4bbe32535eebce7edd8a691ad1be57543cb137a2 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -73,8 +73,6 @@ void SelectXInput2EventsForRootWindow(XDisplay* display, ::Window root_window) {
memset(mask, 0, sizeof(mask));
XISetMask(mask, XI_HierarchyChanged);
- XISetMask(mask, XI_KeyPress);
- XISetMask(mask, XI_KeyRelease);
XIEventMask evmask;
evmask.deviceid = XIAllDevices;
@@ -417,7 +415,6 @@ uint32_t WindowTreeHostX11::DispatchEvent(const ui::PlatformEvent& event) {
compositor()->ScheduleRedrawRect(damage_rect);
break;
}
-
case FocusOut:
if (xev->xfocus.mode != NotifyGrab)
OnHostLostWindowCapture();
@@ -692,6 +689,12 @@ void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) {
SendEventToProcessor(&scrollev);
break;
}
+ case ui::ET_KEY_PRESSED:
+ case ui::ET_KEY_RELEASED: {
+ ui::KeyEvent key_event(xev, false);
+ SendEventToProcessor(&key_event);
+ break;
+ }
case ui::ET_UMA_DATA:
break;
case ui::ET_UNKNOWN:
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698