summaryrefslogtreecommitdiffstats
path: root/ui/platform_window/x11
diff options
context:
space:
mode:
authorkpschoedel@chromium.org <kpschoedel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 17:10:17 +0000
committerkpschoedel@chromium.org <kpschoedel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 17:10:17 +0000
commit947211d035a701096dfd2641c14c348b897ee8f4 (patch)
tree24749f5a778bf736ca9758a8f6fddebaadb36b09 /ui/platform_window/x11
parent7225f8584c2672e7ea20514f6f79dfe42aa670e9 (diff)
downloadchromium_src-947211d035a701096dfd2641c14c348b897ee8f4.zip
chromium_src-947211d035a701096dfd2641c14c348b897ee8f4.tar.gz
chromium_src-947211d035a701096dfd2641c14c348b897ee8f4.tar.bz2
Distinguish between keystroke and character events.
As described in its class comment, a ui::KeyEvent can be either of two distinct kinds. When constructing a ui::KeyEvent from a native event, the distinction is made by a new IsCharFromNative() call, in the same way that other ui::Event properties are determined, instead of having the caller inspect the native event itself. Removing the redundant |is_char| parameter from constructors also prevent accidental synthetic `mixed' events that consuming code does not handle. Incidentally, while KeyEvent constructor calls are being touched, use EF_NONE instead of 0 to make that argument's purpose clear. BUG=380349 TEST=unit_tests,ash_unittests,events_unittests,ui_unittests,interactive_ui_tests Review URL: https://codereview.chromium.org/404203003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/platform_window/x11')
-rw-r--r--ui/platform_window/x11/x11_window.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc
index 8738fca..43de9f0 100644
--- a/ui/platform_window/x11/x11_window.cc
+++ b/ui/platform_window/x11/x11_window.cc
@@ -72,7 +72,7 @@ void X11Window::ProcessXInput2Event(XEvent* xev) {
switch (event_type) {
case ET_KEY_PRESSED:
case ET_KEY_RELEASED: {
- KeyEvent key_event(xev, false);
+ KeyEvent key_event(xev);
delegate_->DispatchEvent(&key_event);
break;
}
@@ -278,7 +278,7 @@ uint32_t X11Window::DispatchEvent(const PlatformEvent& event) {
case KeyPress:
case KeyRelease: {
- KeyEvent key_event(xev, false);
+ KeyEvent key_event(xev);
delegate_->DispatchEvent(&key_event);
break;
}