Index: ui/gfx/screen_win.cc |
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc |
index f17fbc4a3935e9a378e8cac37f24d92f9813d8fb..6266badf148d6f5ff29f4e641f08ca8235940360 100644 |
--- a/ui/gfx/screen_win.cc |
+++ b/ui/gfx/screen_win.cc |
@@ -7,6 +7,7 @@ |
#include <windows.h> |
#include "base/logging.h" |
+#include "ui/base/win/dpi.h" |
#include "ui/gfx/display.h" |
namespace { |
@@ -46,6 +47,11 @@ bool ScreenWin::IsDIPEnabled() { |
gfx::Point ScreenWin::GetCursorScreenPoint() { |
POINT pt; |
GetCursorPos(&pt); |
+ if (IsDIPEnabled()) { |
+ static float os_scale = ui::GetDPIScale(); |
+ pt.x *= os_scale; |
+ pt.y *= os_scale; |
+ } |
return gfx::Point(pt); |
} |