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

Side by Side Diff: ui/aura/window_targeter.cc

Issue 243143002: linux-aura: Supports Compose key with XIM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disabled EF_IME_FABRICATED_KEY flag on CrOS. 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/aura/window_targeter.h" 5 #include "ui/aura/window_targeter.h"
6 6
7 #include "ui/aura/client/capture_client.h" 7 #include "ui/aura/client/capture_client.h"
8 #include "ui/aura/client/event_client.h" 8 #include "ui/aura/client/event_client.h"
9 #include "ui/aura/client/focus_client.h" 9 #include "ui/aura/client/focus_client.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 window->ConvertEventToTarget(target, event); 84 window->ConvertEventToTarget(target, event);
85 return target; 85 return target;
86 } 86 }
87 } 87 }
88 return EventTargeter::FindTargetForLocatedEvent(root, event); 88 return EventTargeter::FindTargetForLocatedEvent(root, event);
89 } 89 }
90 90
91 Window* WindowTargeter::FindTargetForKeyEvent(Window* window, 91 Window* WindowTargeter::FindTargetForKeyEvent(Window* window,
92 const ui::KeyEvent& key) { 92 const ui::KeyEvent& key) {
93 Window* root_window = window->GetRootWindow(); 93 Window* root_window = window->GetRootWindow();
94 if (key.key_code() == ui::VKEY_UNKNOWN) 94 if (key.key_code() == ui::VKEY_UNKNOWN &&
95 (key.flags() & ui::EF_IME_FABRICATED_KEY) == 0)
95 return NULL; 96 return NULL;
96 client::FocusClient* focus_client = client::GetFocusClient(root_window); 97 client::FocusClient* focus_client = client::GetFocusClient(root_window);
97 Window* focused_window = focus_client->GetFocusedWindow(); 98 Window* focused_window = focus_client->GetFocusedWindow();
98 if (!focused_window) 99 if (!focused_window)
99 return window; 100 return window;
100 101
101 client::EventClient* event_client = client::GetEventClient(root_window); 102 client::EventClient* event_client = client::GetEventClient(root_window);
102 if (event_client && 103 if (event_client &&
103 !event_client->CanProcessEventsWithinSubtree(focused_window)) { 104 !event_client->CanProcessEventsWithinSubtree(focused_window)) {
104 focus_client->FocusWindow(NULL); 105 focus_client->FocusWindow(NULL);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 140
140 // If the initial touch is outside the root window, target the root. 141 // If the initial touch is outside the root window, target the root.
141 if (!root_window->bounds().Contains(event.location())) 142 if (!root_window->bounds().Contains(event.location()))
142 return root_window; 143 return root_window;
143 } 144 }
144 145
145 return NULL; 146 return NULL;
146 } 147 }
147 148
148 } // namespace aura 149 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc ('k') | ui/base/ime/input_method_auralinux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698