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

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

Issue 1236923003: Makes DesktopWindowTreeHostXxx to dispatch key event to InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO. Created 5 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/widget/desktop_aura/desktop_window_tree_host_x11.h ('k') | ui/views/win/hwnd_message_handler.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 a56deb7fc9f851beedb554a21c8019a0eee2599a..51c324110a74dd875156941a2d3654224c2b857d 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
@@ -23,6 +23,7 @@
#include "ui/aura/window_property.h"
#include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h"
#include "ui/base/hit_test.h"
+#include "ui/base/ime/input_method.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/devices/x11/device_data_manager_x11.h"
#include "ui/events/devices/x11/device_list_cache_x11.h"
@@ -1517,6 +1518,11 @@ void DesktopWindowTreeHostX11::DispatchTouchEvent(ui::TouchEvent* event) {
}
}
+void DesktopWindowTreeHostX11::DispatchKeyEvent(ui::KeyEvent* event) {
+ GetInputMethod()->DispatchKeyEvent(*event);
+ event->StopPropagation();
+}
+
void DesktopWindowTreeHostX11::ConvertEventToDifferentHost(
ui::LocatedEvent* located_event,
DesktopWindowTreeHostX11* host) {
@@ -1745,7 +1751,7 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
case KeyPress: {
ui::KeyEvent keydown_event(xev);
- SendEventToProcessor(&keydown_event);
+ DispatchKeyEvent(&keydown_event);
break;
}
case KeyRelease: {
@@ -1756,7 +1762,7 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
break;
ui::KeyEvent key_event(xev);
- SendEventToProcessor(&key_event);
+ DispatchKeyEvent(&key_event);
break;
}
case ButtonPress:
@@ -1881,7 +1887,7 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
case ui::ET_KEY_PRESSED:
case ui::ET_KEY_RELEASED: {
ui::KeyEvent key_event(xev);
- SendEventToProcessor(&key_event);
+ DispatchKeyEvent(&key_event);
break;
}
case ui::ET_UNKNOWN:
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ('k') | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698