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

Unified Diff: ash/wm/system_modal_container_layout_manager.cc

Issue 2070163002: Fix "modal isn't modal in multi displays" issue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modal fix Created 4 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/wm/system_modal_container_layout_manager.cc
diff --git a/ash/wm/system_modal_container_layout_manager.cc b/ash/wm/system_modal_container_layout_manager.cc
index 8a9e859fcc8f14e3904415e4fc7988e384613f12..83e7e128e5c6dc72e75f725f225e697e58e0b700 100644
--- a/ash/wm/system_modal_container_layout_manager.cc
+++ b/ash/wm/system_modal_container_layout_manager.cc
@@ -113,22 +113,10 @@ void SystemModalContainerLayoutManager::OnKeyboardBoundsChanging(
PositionDialogsAfterWorkAreaResize();
}
-bool SystemModalContainerLayoutManager::CanWindowReceiveEvents(
+bool SystemModalContainerLayoutManager::IsActiveModalWindows(
aura::Window* window) {
- // We could get when we're at lock screen and there is modal window at
- // system modal window layer which added event filter.
- // Now this lock modal windows layer layout manager should not block events
- // for windows at lock layer.
- // See SystemModalContainerLayoutManagerTest.EventFocusContainers and
- // http://crbug.com/157469
- if (modal_windows_.empty())
- return true;
- // This container can not handle events if the screen is locked and it is not
- // above the lock screen layer (crbug.com/110920).
- if (Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked() &&
- container_->id() < ash::kShellWindowId_LockScreenContainer)
- return true;
- return wm::GetActivatableWindow(window) == modal_window();
+ return modal_window() != nullptr &&
James Cook 2016/06/16 20:31:35 For my knowledge: Do we now prefer comparing to nu
oshima 2016/06/17 00:06:12 I saw the discussion but I haven't read to the con
James Cook 2016/06/17 16:04:43 I prefer !pointer myself, just for consistency wit
+ wm::GetActivatableWindow(window) == modal_window();
}
bool SystemModalContainerLayoutManager::ActivateNextModalWindow() {

Powered by Google App Engine
This is Rietveld 408576698