From e8de9ea15ead4a310e303b86f785433c837e5910 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Fri, 23 Mar 2012 16:21:17 +0000 Subject: Remove stops_event_propagation from Window, since it's broken. Changes it to be implemented by the Aura client, via a new interface EventClient. The client can determine whether or not a given window and its subtree can receive events. I also cleaned up the way screen locking is entered/exited via the delegate, and some stuff in ash/shell. http://crbug.com/119347 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128328 Review URL: https://chromiumcodereview.appspot.com/9788001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128503 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shell.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ash/shell.cc') diff --git a/ash/shell.cc b/ash/shell.cc index dcdf714..2d2489a 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -42,6 +42,7 @@ #include "ash/wm/base_layout_manager.h" #include "ash/wm/custom_frame_view_ash.h" #include "ash/wm/dialog_frame_view.h" +#include "ash/wm/event_client_impl.h" #include "ash/wm/panel_window_event_filter.h" #include "ash/wm/panel_layout_manager.h" #include "ash/wm/partial_screenshot_event_filter.h" @@ -194,7 +195,7 @@ void CreateSpecialContainers(aura::RootWindow* root_window) { lock_screen_containers); lock_container->SetLayoutManager( new internal::BaseLayoutManager(root_window)); - lock_container->set_stops_event_propagation(true); + // TODO(beng): stopsevents aura::Window* lock_modal_container = CreateContainer( internal::kShellWindowId_LockSystemModalContainer, @@ -551,6 +552,8 @@ Shell::~Shell() { resize_shadow_controller_.reset(); shadow_controller_.reset(); window_cycle_controller_.reset(); + event_client_.reset(); + monitor_controller_.reset(); // Launcher widget has a InputMethodBridge that references to // input_method_filter_'s input_method_. So explicitly release launcher_ @@ -639,6 +642,8 @@ void Shell::Init() { root_window_layout_ = new internal::RootWindowLayoutManager(root_window); root_window->SetLayoutManager(root_window_layout_); + event_client_.reset(new internal::EventClientImpl(root_window)); + if (delegate_.get()) status_widget_ = delegate_->CreateStatusArea(); @@ -776,9 +781,7 @@ void Shell::ToggleAppList() { } bool Shell::IsScreenLocked() const { - const aura::Window* lock_screen_container = GetContainer( - internal::kShellWindowId_LockScreenContainer); - return lock_screen_container->StopsEventPropagation(); + return !delegate_.get() || delegate_->IsScreenLocked(); } bool Shell::IsModalWindowOpen() const { -- cgit v1.1