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

Unified Diff: ash/wm/system_modal_container_event_filter.cc

Issue 2127263002: Keep the SystemModalContainerEventHandler added (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep the SystemModalContainerEventHandler added Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | components/exo/pointer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_modal_container_event_filter.cc
diff --git a/ash/wm/system_modal_container_event_filter.cc b/ash/wm/system_modal_container_event_filter.cc
index 5e210534c741134352e49536871944c363dbde5b..6098b7d8b9e70400012d328c61a1ea24f5cf0441 100644
--- a/ash/wm/system_modal_container_event_filter.cc
+++ b/ash/wm/system_modal_container_event_filter.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "ash/wm/system_modal_container_event_filter.h"
-
+#include "ash/common/wm_shell.h"
#include "ash/wm/system_modal_container_event_filter_delegate.h"
#include "ui/aura/window.h"
#include "ui/events/event.h"
@@ -17,6 +17,9 @@ SystemModalContainerEventFilter::SystemModalContainerEventFilter(
SystemModalContainerEventFilter::~SystemModalContainerEventFilter() {}
void SystemModalContainerEventFilter::OnEvent(ui::Event* event) {
+ // Only filter modal events if a modal window is open.
+ if (!WmShell::Get()->IsSystemModalWindowOpen())
+ return;
aura::Window* target = static_cast<aura::Window*>(event->target());
if (!delegate_->CanWindowReceiveEvents(target))
event->StopPropagation();
« no previous file with comments | « ash/shell.cc ('k') | components/exo/pointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698