| Index: services/ui/ws/event_dispatcher.h
|
| diff --git a/services/ui/ws/event_dispatcher.h b/services/ui/ws/event_dispatcher.h
|
| index 8b084d7994f697a555d078ac1023b4dc5336f825..a99846e85eaf25884bc33862f21d738c0c567d88 100644
|
| --- a/services/ui/ws/event_dispatcher.h
|
| +++ b/services/ui/ws/event_dispatcher.h
|
| @@ -59,10 +59,12 @@ class EventDispatcher : public ServerWindowObserver, public DragCursorUpdater {
|
| // any events to the delegate.
|
| void Reset();
|
|
|
| - void SetMousePointerScreenLocation(const gfx::Point& screen_location);
|
| + void SetMousePointerDisplayLocation(const gfx::Point& display_location,
|
| + const int64_t display_id);
|
| const gfx::Point& mouse_pointer_last_location() const {
|
| return mouse_pointer_last_location_;
|
| }
|
| + int64_t mouse_pointer_display_id() const { return mouse_pointer_display_id_; }
|
|
|
| // Returns the cursor for the current target, or POINTER if the mouse is not
|
| // over a valid target.
|
| @@ -142,7 +144,9 @@ class EventDispatcher : public ServerWindowObserver, public DragCursorUpdater {
|
| // ANY and there is a matching accelerator with PRE_TARGET found, than only
|
| // OnAccelerator() is called. The expectation is after the PRE_TARGET has been
|
| // handled this is again called with an AcceleratorMatchPhase of POST_ONLY.
|
| - void ProcessEvent(const ui::Event& event, AcceleratorMatchPhase match_phase);
|
| + void ProcessEvent(const ui::Event& event,
|
| + const int64_t display_id,
|
| + AcceleratorMatchPhase match_phase);
|
|
|
| private:
|
| friend class test::EventDispatcherTestApi;
|
| @@ -234,7 +238,8 @@ class EventDispatcher : public ServerWindowObserver, public DragCursorUpdater {
|
| Accelerator* FindAccelerator(const ui::KeyEvent& event,
|
| const ui::mojom::AcceleratorPhase phase);
|
|
|
| - DeepestWindow FindDeepestVisibleWindowForEvents(const gfx::Point& location);
|
| + DeepestWindow FindDeepestVisibleWindowForEvents(gfx::Point* location,
|
| + int64_t* display_id);
|
|
|
| // Clears the implicit captures in |pointer_targets_|, with the exception of
|
| // |window|. |window| may be null. |client_id| is the target client of
|
| @@ -265,9 +270,15 @@ class EventDispatcher : public ServerWindowObserver, public DragCursorUpdater {
|
| ServerWindow* mouse_cursor_source_window_;
|
| bool mouse_cursor_in_non_client_area_;
|
|
|
| - // The on screen location of the mouse pointer. This can be outside the
|
| - // bounds of |mouse_cursor_source_window_|, which can capture the cursor.
|
| + // The location of the mouse pointer in display coordinates. This can be
|
| + // outside the bounds of |mouse_cursor_source_window_|, which can capture the
|
| + // cursor.
|
| gfx::Point mouse_pointer_last_location_;
|
| + // Id of the display |mouse_pointer_last_location_| is on.
|
| + int64_t mouse_pointer_display_id_ = display::kInvalidDisplayId;
|
| +
|
| + // Id of the display the most recent event is on.
|
| + int64_t event_display_id_ = display::kInvalidDisplayId;
|
|
|
| std::map<uint32_t, std::unique_ptr<Accelerator>> accelerators_;
|
|
|
|
|