| Index: ui/wm/core/default_screen_position_client.cc
|
| diff --git a/ui/wm/core/default_screen_position_client.cc b/ui/wm/core/default_screen_position_client.cc
|
| index d26a91ed9c8f92c66495eab9cfc7de7e5a749d87..725a7d8e3942edabb299529ef81516880fe8c8ba 100644
|
| --- a/ui/wm/core/default_screen_position_client.cc
|
| +++ b/ui/wm/core/default_screen_position_client.cc
|
| @@ -9,6 +9,10 @@
|
| #include "ui/gfx/geometry/point_conversions.h"
|
| #include "ui/gfx/screen.h"
|
|
|
| +#if defined(OS_WIN)
|
| +#include "ui/gfx/screen_win.h"
|
| +#endif
|
| +
|
| namespace wm {
|
|
|
| DefaultScreenPositionClient::DefaultScreenPositionClient() {
|
| @@ -20,10 +24,15 @@ DefaultScreenPositionClient::~DefaultScreenPositionClient() {
|
| gfx::Point DefaultScreenPositionClient::GetOriginInScreen(
|
| const aura::Window* root_window) {
|
| gfx::Point origin_in_pixels = root_window->GetHost()->GetBounds().origin();
|
| +#if defined(OS_WIN)
|
| + // Origins in Windows are fixed. Use the Windows aware scaling instead.
|
| + return gfx::ScreenWin::ScreenToDIPPoint(origin_in_pixels);
|
| +#else
|
| aura::Window* window = const_cast<aura::Window*>(root_window);
|
| float scale = gfx::Screen::GetScreenFor(window)->
|
| GetDisplayNearestWindow(window).device_scale_factor();
|
| return gfx::ScaleToFlooredPoint(origin_in_pixels, 1.0f / scale);
|
| +#endif
|
| }
|
|
|
| void DefaultScreenPositionClient::ConvertPointToScreen(
|
|
|