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

Unified Diff: chrome/browser/ui/views/fullscreen_exit_bubble_views.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 new addition 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: chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
index 760c2de398ddf30763e4aedbe9cbb916ed919724..48d169bd039a22b0792f947dde4b99f072750926 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
@@ -340,7 +340,9 @@ gfx::Rect FullscreenExitBubbleViews::GetPopupRect(
gfx::Size size(view_->GetPreferredSize());
// NOTE: don't use the bounds of the root_view_. On linux changing window
// size is async. Instead we use the size of the screen.
- gfx::Rect screen_bounds = gfx::Screen::GetDisplayNearestWindow(
+ gfx::Screen* screen =
+ gfx::Screen::GetScreenFor(root_view_->GetWidget()->GetNativeView());
+ gfx::Rect screen_bounds = screen->GetDisplayNearestWindow(
root_view_->GetWidget()->GetNativeView()).bounds();
gfx::Point origin(screen_bounds.x() +
(screen_bounds.width() - size.width()) / 2,
@@ -357,7 +359,8 @@ gfx::Rect FullscreenExitBubbleViews::GetPopupRect(
}
gfx::Point FullscreenExitBubbleViews::GetCursorScreenPoint() {
- gfx::Point cursor_pos = gfx::Screen::GetCursorScreenPoint();
+ gfx::Point cursor_pos = gfx::Screen::GetScreenFor(
+ root_view_->GetWidget()->GetNativeView())->GetCursorScreenPoint();
views::View::ConvertPointToTarget(NULL, root_view_, &cursor_pos);
return cursor_pos;
}

Powered by Google App Engine
This is Rietveld 408576698