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

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 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: ui/views/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 612ddd02dff6de60c5e3aaecf9778564ce795d71..6e981413a5a5861eaeddfd712ed8afa9d76b42f9 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -74,7 +74,8 @@ bool CustomButton::IsMouseHovered() const {
if (!GetWidget())
return false;
- gfx::Point cursor_pos(gfx::Screen::GetCursorScreenPoint());
+ gfx::Point cursor_pos(gfx::Screen::GetScreenFor(
+ GetWidget()->GetNativeView())->GetCursorScreenPoint());
ConvertPointToTarget(NULL, this, &cursor_pos);
return HitTestPoint(cursor_pos);
}

Powered by Google App Engine
This is Rietveld 408576698