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

Side by Side Diff: branches/1916/src/ui/base/ime/input_method_auralinux.cc

Issue 253183002: Revert 266967 "Merge 266651 "linux-aura: Supports Compose key wi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/ime/input_method_auralinux.h" 5 #include "ui/base/ime/input_method_auralinux.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "ui/base/ime/linux/linux_input_method_context_factory.h" 8 #include "ui/base/ime/linux/linux_input_method_context_factory.h"
9 #include "ui/base/ime/text_input_client.h" 9 #include "ui/base/ime/text_input_client.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 bool InputMethodAuraLinux::DispatchKeyEvent(const ui::KeyEvent& event) { 49 bool InputMethodAuraLinux::DispatchKeyEvent(const ui::KeyEvent& event) {
50 DCHECK(event.type() == ET_KEY_PRESSED || event.type() == ET_KEY_RELEASED); 50 DCHECK(event.type() == ET_KEY_PRESSED || event.type() == ET_KEY_RELEASED);
51 DCHECK(system_toplevel_window_focused()); 51 DCHECK(system_toplevel_window_focused());
52 52
53 // If no text input client, do nothing. 53 // If no text input client, do nothing.
54 if (!GetTextInputClient()) 54 if (!GetTextInputClient())
55 return DispatchKeyEventPostIME(event); 55 return DispatchKeyEventPostIME(event);
56 56
57 // Let an IME handle the key event first. 57 // Let an IME handle the key event first.
58 if (input_method_context_->DispatchKeyEvent(event)) { 58 if (input_method_context_->DispatchKeyEvent(event)) {
59 if (event.type() == ET_KEY_PRESSED && 59 if (event.type() == ET_KEY_PRESSED) {
60 (event.flags() & ui::EF_IME_FABRICATED_KEY) == 0) {
61 const ui::KeyEvent fabricated_event(ET_KEY_PRESSED, 60 const ui::KeyEvent fabricated_event(ET_KEY_PRESSED,
62 VKEY_PROCESSKEY, 61 VKEY_PROCESSKEY,
63 event.flags(), 62 event.flags(),
64 false); // is_char 63 false); // is_char
65 DispatchKeyEventPostIME(fabricated_event); 64 DispatchKeyEventPostIME(fabricated_event);
66 } 65 }
67 return true; 66 return true;
68 } 67 }
69 68
70 // Otherwise, insert the character. 69 // Otherwise, insert the character.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 TextInputClient* focused_before, 146 TextInputClient* focused_before,
148 TextInputClient* focused) { 147 TextInputClient* focused) {
149 input_method_context_->Reset(); 148 input_method_context_->Reset();
150 input_method_context_->OnTextInputTypeChanged( 149 input_method_context_->OnTextInputTypeChanged(
151 focused ? focused->GetTextInputType() : TEXT_INPUT_TYPE_NONE); 150 focused ? focused->GetTextInputType() : TEXT_INPUT_TYPE_NONE);
152 151
153 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); 152 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused);
154 } 153 }
155 154
156 } // namespace ui 155 } // namespace ui
OLDNEW
« no previous file with comments | « branches/1916/src/ui/aura/window_targeter.cc ('k') | branches/1916/src/ui/events/event_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698