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

Unified Diff: components/exo/pointer.cc

Issue 2812663002: exo: Fix cursor scale when crossing displays (Closed)
Patch Set: Rebase Created 3 years, 8 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 | components/exo/shell_surface.cc » ('j') | 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 62fbcb3d8dfaf27f4da2a360eef3e9ece01703e3..df906c9bef2c07793a45ef13eed3cb996ab05408 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -265,6 +265,13 @@ void Pointer::OnCursorDisplayChanging(const display::Display& display) {
auto info = helper->GetDisplayInfo(display.id());
display_scale_ = info.GetEffectiveUIScale() * info.device_scale_factor();
device_scale_factor_ = display.device_scale_factor();
+
+ if (focus_ && surface_) {
+ // Capture is asynchronous, so avoid rendering old cursor in the meantime.
reveman 2017/04/28 21:37:09 I'm still not convinced that we should do this. On
oshima 2017/05/01 22:18:04 Yes, we need a better way to handle custom cursors
Dominik Laskowski 2017/05/06 00:34:45 Done, and filed a bug: http://crbug.com/719116
+ cursor_capture_weak_ptr_factory_.InvalidateWeakPtrs();
+ UpdateCursor(ui::CursorType::kNone);
+ CaptureCursor();
+ }
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698