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

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 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
« no previous file with comments | « ui/aura/desktop/desktop_screen_x11.cc ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e21c8703551f09c572ba6b1c9afc971080e86829..45c5568ba9b2ad146405e1b156834d3c33f7ef14 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -432,7 +432,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);
@@ -688,8 +689,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};
« no previous file with comments | « ui/aura/desktop/desktop_screen_x11.cc ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698