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

Unified Diff: chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc

Issue 438723003: Revert of Listen for key events in SetupXI2ForXWindow() (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 | ui/events/x/touch_factory_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
diff --git a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
index db72e33919b15da0fd6fe68fafc96bf9a2c35be9..bb263c0d9d93ec795f3b3f37bf2c6316c1d21a8a 100644
--- a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
@@ -19,7 +19,6 @@
#include "ui/base/ime/composition_text_util_pango.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/events/event.h"
-#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/gfx/x/x11_types.h"
namespace libgtk2ui {
@@ -192,16 +191,8 @@
GdkEvent* X11InputMethodContextImplGtk2::GdkEventFromNativeEvent(
const base::NativeEvent& native_event) {
- XEvent xkeyevent;
- if (native_event->type == GenericEvent) {
- // If this is an XI2 key event, build a matching core X event, to avoid
- // having two cases for every use.
- ui::InitXKeyEventFromXIDeviceEvent(*native_event, &xkeyevent);
- } else {
- DCHECK(native_event->type == KeyPress || native_event->type == KeyRelease);
- xkeyevent.xkey = native_event->xkey;
- }
- const XKeyEvent& xkey = xkeyevent.xkey;
+ const XKeyEvent& xkey = native_event->xkey;
+ DCHECK(xkey.type == KeyPress || xkey.type == KeyRelease);
// Get a GdkDisplay.
GdkDisplay* display = gdk_x11_lookup_xdisplay(xkey.display);
« no previous file with comments | « no previous file | ui/events/x/touch_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698