Chromium Code Reviews| 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 c81bb8cb86b78b4d1ccfc2e6e0649a9e30cc96f3..a864cdea4013c5fe009578513acf89c10966e693 100644 |
| --- a/components/mus/ws/window_manager_state.cc |
| +++ b/components/mus/ws/window_manager_state.cc |
| @@ -226,6 +226,15 @@ void WindowManagerState::ProcessEvent(const ui::Event& event) { |
| QueueEvent(event, nullptr); |
| return; |
| } |
| + |
| + // Only send events to any event observers after the previous event was acked, |
| + // to maintain ordering with events sent via normal dispatch. |
| + // TODO(jamescook): If the event dispatcher finds a target window, and that |
| + // window's window tree has an event observer that matches the event, just |
| + // send the event once via normal dispatch and let the client library trigger |
| + // its event observer mechanism. http://crbug.com/605580 |
| + window_server()->SendToEventObservers(event); |
|
sky
2016/04/21 17:23:03
This comment doesn't match with the code. This fun
James Cook
2016/04/22 18:22:54
This code is gone.
|
| + |
| event_dispatcher_.ProcessEvent(event); |
| } |
| @@ -274,6 +283,11 @@ void WindowManagerState::ProcessNextEventFromQueue() { |
| event_dispatcher_.ProcessEvent(*queued_event->event); |
| return; |
| } |
| + |
| + // If the event has a target it was already sent to observers before its |
| + // initial processing. |
| + window_server()->SendToEventObservers(*queued_event->event); |
| + |
| if (queued_event->processed_target->IsValid()) { |
| DispatchInputEventToWindowImpl( |
| queued_event->processed_target->window(), |