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

Unified Diff: ui/gfx/screen_win.cc

Issue 12257016: (Not ready for review!) Toolbar and views high dpi support. Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cleaned up more useless diffs. Created 7 years, 10 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/gfx/display.cc ('k') | ui/gfx/skbitmap_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « ui/gfx/display.cc ('k') | ui/gfx/skbitmap_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698