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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 10939006: Make cursors work on win aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 3 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 | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_view_aura.cc (revision 157487)
+++ content/browser/renderer_host/render_widget_host_view_aura.cc (working copy)
@@ -428,7 +428,7 @@
}
gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
- return window_->GetBoundsInRootWindow();
+ return window_->GetBoundsInScreen();
}
void RenderWidgetHostViewAura::UpdateCursor(const WebCursor& cursor) {
@@ -1628,7 +1628,11 @@
if (!root_window)
return;
- if (root_window->GetEventHandlerForPoint(screen_point) != window_)
+ gfx::Rect screen_rect = GetViewBounds();
+ gfx::Point local_point = screen_point;
+ local_point.Offset(-screen_rect.x(), -screen_rect.y());
+
+ if (root_window->GetEventHandlerForPoint(local_point) != window_)
return;
gfx::NativeCursor cursor = current_cursor_.GetNativeCursor();
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698