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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build 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/views/view_targeter_unittest.cc ('k') | ui/views/widget/root_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 002d20b0a65d18495eba28e674e3888ac319a0f2..d121387f7f82f48b367c3d1dcd2165af5fb3186c 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -1582,7 +1582,11 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
compositor()->ScheduleRedrawRect(damage_rect);
break;
}
- case KeyPress:
+ case KeyPress: {
+ ui::KeyEvent keydown_event(xev);
+ SendEventToProcessor(&keydown_event);
+ break;
+ }
case KeyRelease: {
// There is no way to deactivate a window in X11 so ignore input if
// window is supposed to be 'inactive'. See comments in
@@ -1590,7 +1594,7 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
if (!IsActive() && !HasCapture())
break;
- ui::KeyEvent key_event(xev, false);
+ ui::KeyEvent key_event(xev);
SendEventToProcessor(&key_event);
break;
}
« no previous file with comments | « ui/views/view_targeter_unittest.cc ('k') | ui/views/widget/root_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698