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

Unified Diff: components/mus/ws/window_manager_state.cc

Issue 1818333002: Reland: mus: Enable system modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased after fixing the crash Created 4 years, 7 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 | « components/mus/ws/window_manager_state.h ('k') | components/mus/ws/window_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_manager_state.cc
diff --git a/components/mus/ws/window_manager_state.cc b/components/mus/ws/window_manager_state.cc
index 681a52345687cd9536817f4c5dbb4ef4d18303b6..71e69c4d4434ef16c794bd7931f443be8da3b0b6 100644
--- a/components/mus/ws/window_manager_state.cc
+++ b/components/mus/ws/window_manager_state.cc
@@ -127,23 +127,16 @@ bool WindowManagerState::SetCapture(ServerWindow* window,
void WindowManagerState::ReleaseCaptureBlockedByModalWindow(
const ServerWindow* modal_window) {
- if (!capture_window() || !modal_window->is_modal() ||
- !modal_window->IsDrawn())
- return;
-
- if (modal_window->transient_parent() &&
- !modal_window->transient_parent()->Contains(capture_window())) {
- return;
- }
-
- SetCapture(nullptr, false);
+ event_dispatcher_.ReleaseCaptureBlockedByModalWindow(modal_window);
}
void WindowManagerState::ReleaseCaptureBlockedByAnyModalWindow() {
- if (!capture_window() || !capture_window()->IsBlockedByModalWindow())
- return;
+ event_dispatcher_.ReleaseCaptureBlockedByAnyModalWindow();
+}
- SetCapture(nullptr, false);
+void WindowManagerState::AddSystemModalWindow(ServerWindow* window) {
+ DCHECK(!window->transient_parent());
+ event_dispatcher_.AddSystemModalWindow(window);
}
mojom::DisplayPtr WindowManagerState::ToMojomDisplay() const {
« no previous file with comments | « components/mus/ws/window_manager_state.h ('k') | components/mus/ws/window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698