Index: ash/system/tray/tray_event_filter.cc |
diff --git a/ash/system/tray/tray_event_filter.cc b/ash/system/tray/tray_event_filter.cc |
index 43f142b4cd7e4ee240918cf5f1d0762bdfb37538..7ca40b51b164a5cc6bcfb610a3cf3f7f75f3cdba 100644 |
--- a/ash/system/tray/tray_event_filter.cc |
+++ b/ash/system/tray/tray_event_filter.cc |
@@ -47,14 +47,14 @@ void TrayEventFilter::ProcessPressedEvent(const gfx::Point& location_in_screen, |
views::Widget* target) { |
if (target) { |
aura::Window* window = target->GetNativeWindow(); |
- int container_id = wm::GetContainerForWindow(window)->id(); |
+ int target_container_id = wm::GetContainerForWindow(window)->id(); |
// Don't process events that occurred inside an embedded menu, for example |
// the right-click menu in a popup notification. |
- if (container_id == kShellWindowId_MenuContainer) |
+ if (target_container_id == kShellWindowId_MenuContainer) |
return; |
// Don't process events that occurred inside a popup notification |
// from message center. |
- if (container_id == kShellWindowId_StatusContainer && |
+ if (target_container_id == kShellWindowId_StatusContainer && |
window->type() == aura::client::WINDOW_TYPE_POPUP && |
target->IsAlwaysOnTop()) { |
return; |
@@ -73,7 +73,11 @@ void TrayEventFilter::ProcessPressedEvent(const gfx::Point& location_in_screen, |
gfx::Rect bounds = bubble_widget->GetWindowBoundsInScreen(); |
bounds.Inset(wrapper->bubble_view()->GetBorderInsets()); |
- if (bounds.Contains(location_in_screen)) |
+ int bubble_container_id = |
+ wm::GetContainerForWindow(bubble_widget->GetNativeWindow())->id(); |
+ // Don't process the events that occurred inside the bubble. |
+ if (bounds.Contains(location_in_screen) && |
+ bubble_container_id == kShellWindowId_SettingBubbleContainer) |
continue; |
if (wrapper->tray()) { |
// If the user clicks on the parent tray, don't process the event here, |