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

Unified Diff: ui/base/win/events_win.cc

Issue 16336027: Enable high dpi in win/views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 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/base/win/dpi.cc ('k') | ui/gfx/canvas_paint_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/events_win.cc
diff --git a/ui/base/win/events_win.cc b/ui/base/win/events_win.cc
index 596d8c5bf613753a9a9d0003367af9c47918f5a3..458c8e629525dca1578f57e7f72b07e3343e0aa9 100644
--- a/ui/base/win/events_win.cc
+++ b/ui/base/win/events_win.cc
@@ -11,6 +11,7 @@
#include "base/win/win_util.h"
#include "ui/base/events/event_utils.h"
#include "ui/base/keycodes/keyboard_code_conversion_win.h"
+#include "ui/base/win/dpi.h"
#include "ui/gfx/point.h"
namespace ui {
@@ -211,7 +212,9 @@ gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
POINT native_point = { GET_X_LPARAM(native_event.lParam),
GET_Y_LPARAM(native_event.lParam) };
ScreenToClient(native_event.hwnd, &native_point);
- return gfx::Point(native_point);
+ gfx::Point location(native_point);
+ location = ui::win::ScreenToDIPPoint(location);
+ return location;
}
gfx::Point EventSystemLocationFromNative(
« no previous file with comments | « ui/base/win/dpi.cc ('k') | ui/gfx/canvas_paint_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698