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

Side by Side Diff: branches/1916/src/ui/aura/window_targeter.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 (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)
96 return NULL; 95 return NULL;
97 client::FocusClient* focus_client = client::GetFocusClient(root_window); 96 client::FocusClient* focus_client = client::GetFocusClient(root_window);
98 Window* focused_window = focus_client->GetFocusedWindow(); 97 Window* focused_window = focus_client->GetFocusedWindow();
99 if (!focused_window) 98 if (!focused_window)
100 return window; 99 return window;
101 100
102 client::EventClient* event_client = client::GetEventClient(root_window); 101 client::EventClient* event_client = client::GetEventClient(root_window);
103 if (event_client && 102 if (event_client &&
104 !event_client->CanProcessEventsWithinSubtree(focused_window)) { 103 !event_client->CanProcessEventsWithinSubtree(focused_window)) {
105 focus_client->FocusWindow(NULL); 104 focus_client->FocusWindow(NULL);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 139
141 // If the initial touch is outside the root window, target the root. 140 // If the initial touch is outside the root window, target the root.
142 if (!root_window->bounds().Contains(event.location())) 141 if (!root_window->bounds().Contains(event.location()))
143 return root_window; 142 return root_window;
144 } 143 }
145 144
146 return NULL; 145 return NULL;
147 } 146 }
148 147
149 } // namespace aura 148 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698