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

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

Issue 2778943005: Keep root_location to be in pixels and display coordinates in WS. (Closed)
Patch Set: . 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
Index: services/ui/ws/window_manager_state.h
diff --git a/services/ui/ws/window_manager_state.h b/services/ui/ws/window_manager_state.h
index ce897244a81ee49e82e48e4f17faf0a33184868e..8e98b95e26b8174b7ca61fa88f3d5fde6823f740 100644
--- a/services/ui/ws/window_manager_state.h
+++ b/services/ui/ws/window_manager_state.h
@@ -96,7 +96,8 @@ class WindowManagerState : public EventDispatcherDelegate,
// Returns true if this is the WindowManager of the active user.
bool IsActive() const;
- void Activate(const gfx::Point& mouse_location_on_screen);
+ void Activate(const gfx::Point& mouse_location_on_display,
+ const int64_t display_id);
void Deactivate();
// Processes an event from PlatformDisplay.
@@ -240,6 +241,9 @@ class WindowManagerState : public EventDispatcherDelegate,
const Event& event,
EventDispatchPhase phase);
+ // Helper function to update |point| to be in screen coordinates.
+ bool ConvertPointToScreen(gfx::Point* point, const int64_t display_id);
+
// EventDispatcherDelegate:
void OnAccelerator(uint32_t accelerator_id,
const Event& event,
@@ -251,14 +255,16 @@ class WindowManagerState : public EventDispatcherDelegate,
void UpdateNativeCursorFromDispatcher() override;
void OnCaptureChanged(ServerWindow* new_capture,
ServerWindow* old_capture) override;
- void OnMouseCursorLocationChanged(const gfx::Point& point) override;
+ void OnMouseCursorLocationChanged(const gfx::Point& point,
+ const int64_t display_id) override;
void DispatchInputEventToWindow(ServerWindow* target,
ClientSpecificId client_id,
const Event& event,
Accelerator* accelerator) override;
ClientSpecificId GetEventTargetClientId(const ServerWindow* window,
bool in_nonclient_area) override;
- ServerWindow* GetRootWindowContaining(gfx::Point* location) override;
+ ServerWindow* GetRootWindowContaining(gfx::Point* location_in_display,
+ int64_t* display_id) override;
void OnEventTargetNotFound(const Event& event) override;
// ServerWindowObserver:

Powered by Google App Engine
This is Rietveld 408576698