| Index: ui/aura_shell/root_window_event_filter.cc
|
| ===================================================================
|
| --- ui/aura_shell/root_window_event_filter.cc (revision 114022)
|
| +++ ui/aura_shell/root_window_event_filter.cc (working copy)
|
| @@ -8,8 +8,9 @@
|
| #include "ui/aura/focus_manager.h"
|
| #include "ui/aura/root_window.h"
|
| #include "ui/aura/window_delegate.h"
|
| +#include "ui/aura_shell/activation_controller.h"
|
| #include "ui/aura_shell/shell.h"
|
| -#include "ui/aura_shell/stacking_controller.h"
|
| +#include "ui/aura_shell/window_util.h"
|
| #include "ui/base/hit_test.h"
|
|
|
| namespace aura_shell {
|
| @@ -79,7 +80,7 @@
|
| return true;
|
|
|
| if (event->type() == ui::ET_MOUSE_PRESSED)
|
| - ActivateIfNecessary(target, event);
|
| + target->GetFocusManager()->SetFocusedWindow(target);
|
|
|
| return false;
|
| }
|
| @@ -92,24 +93,13 @@
|
| return status;
|
|
|
| if (event->type() == ui::ET_TOUCH_PRESSED)
|
| - ActivateIfNecessary(target, event);
|
| + target->GetFocusManager()->SetFocusedWindow(target);
|
| return ui::TOUCH_STATUS_UNKNOWN;
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // RootWindowEventFilter, private:
|
|
|
| -void RootWindowEventFilter::ActivateIfNecessary(aura::Window* window,
|
| - aura::Event* event) {
|
| - aura::Window* activatable = StackingController::GetActivatableWindow(window);
|
| - if (activatable == aura::RootWindow::GetInstance()->active_window()) {
|
| - // |window| is a descendant of the active window, no need to activate.
|
| - window->GetFocusManager()->SetFocusedWindow(window);
|
| - } else {
|
| - aura::RootWindow::GetInstance()->SetActiveWindow(activatable, window);
|
| - }
|
| -}
|
| -
|
| void RootWindowEventFilter::UpdateCursor(aura::Window* target,
|
| aura::MouseEvent* event) {
|
| gfx::NativeCursor cursor = target->GetCursor(event->location());
|
|
|