| 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 7fc9bd2556f0b80562c7b4eb5b9c1fa5fef1e4a4..44d21fce37dc401896b944eb61863b268c55f9bc 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 {
|
|
|