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

Unified Diff: ui/aura/root_window_host_linux.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/aura/root_window_host_linux.cc
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index ca5c73ed7978998d8f21be03db356252729b4ed3..b4f6dc72572facb9e374d7a41d9b763b68a97265 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -491,7 +491,8 @@ bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) {
client::ScreenPositionClient* client =
client::GetScreenPositionClient(root);
if (client) {
- gfx::Point p = gfx::Screen::GetCursorScreenPoint();
+ gfx::Point p = gfx::Screen::GetScreenFor(root)->
+ GetCursorScreenPoint();
client->ConvertPointFromScreen(root, &p);
if (root->ContainsPoint(p)) {
root->ConvertPointToNativeScreen(&p);
@@ -747,8 +748,8 @@ void RootWindowHostLinux::SetBounds(const gfx::Rect& bounds) {
// Even if the host window's size doesn't change, aura's root window
// size, which is in DIP, changes when the scale changes.
float current_scale = delegate_->GetDeviceScaleFactor();
- float new_scale = gfx::Screen::GetDisplayNearestWindow(
- delegate_->AsRootWindow()).device_scale_factor();
+ float new_scale = gfx::Screen::GetScreenFor(delegate_->AsRootWindow())->
+ GetDisplayNearestWindow(delegate_->AsRootWindow()).device_scale_factor();
bool origin_changed = bounds_.origin() != bounds.origin();
bool size_changed = bounds_.size() != bounds.size();
XWindowChanges changes = {0};

Powered by Google App Engine
This is Rietveld 408576698