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

Unified Diff: components/exo/pointer.cc

Issue 2177423002: exo: Fix invisible cursor on secondary displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index 5640ae93c59f81a7630688fa04c4b1cd93872a17..0c81c043317ff5d8b91c8e54a60a0c9037362227 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -216,10 +216,10 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) {
// Update cursor location if mouse event caused it to change.
gfx::Point mouse_location = aura::Env::GetInstance()->last_mouse_location();
- if (mouse_location != widget_->GetNativeWindow()->bounds().origin()) {
- gfx::Rect bounds = widget_->GetNativeWindow()->bounds();
+ gfx::Rect bounds = widget_->GetWindowBoundsInScreen();
+ if (mouse_location != bounds.origin()) {
bounds.set_origin(mouse_location);
- widget_->GetNativeWindow()->SetBounds(bounds);
+ widget_->SetBounds(bounds);
}
UpdateCursorScale();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698