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

Unified Diff: ash/system/tray/tray_event_filter.cc

Issue 2930123002: Tablet WM : Swiping on system tray bubble. (Closed)
Patch Set: Fixed tdanderson's comments. Created 3 years, 6 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
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,

Powered by Google App Engine
This is Rietveld 408576698