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

Unified Diff: services/ui/ws/event_dispatcher.h

Issue 2778943005: Keep root_location to be in pixels and display coordinates in WS. (Closed)
Patch Set: const Created 3 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 | « services/ui/ws/display_manager.cc ('k') | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « services/ui/ws/display_manager.cc ('k') | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698