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

Unified Diff: ui/views/widget/aero_tooltip_manager.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/views/controls/native/native_view_host_win.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/aero_tooltip_manager.cc
diff --git a/ui/views/widget/aero_tooltip_manager.cc b/ui/views/widget/aero_tooltip_manager.cc
index 620d821d4364241ec53ceb82977cf9e3f2d6acef..233d75c862e33bac685161b60bb415da171e62aa 100644
--- a/ui/views/widget/aero_tooltip_manager.cc
+++ b/ui/views/widget/aero_tooltip_manager.cc
@@ -12,6 +12,7 @@
#include "base/message_loop.h"
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/base/win/hwnd_util.h"
+#include "ui/base/win/dpi.h"
#include "ui/gfx/point.h"
namespace views {
@@ -40,12 +41,14 @@ void AeroTooltipManager::OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param) {
initial_timer_->Disown();
if (u_msg == WM_MOUSEMOVE || u_msg == WM_NCMOUSEMOVE) {
- gfx::Point mouse_pos(l_param);
+ gfx::Point mouse_pos_in_pixels(l_param);
+ gfx::Point mouse_pos = ui::win::ScreenToDIPPoint(mouse_pos_in_pixels);
if (u_msg == WM_NCMOUSEMOVE) {
// NC message coordinates are in screen coordinates.
- POINT temp = mouse_pos.ToPOINT();
+ POINT temp = mouse_pos_in_pixels.ToPOINT();
::MapWindowPoints(HWND_DESKTOP, GetParent(), &temp, 1);
- mouse_pos.SetPoint(temp.x, temp.y);
+ mouse_pos_in_pixels.SetPoint(temp.x, temp.y);
+ mouse_pos = ui::win::ScreenToDIPPoint(mouse_pos_in_pixels);
}
if (last_mouse_pos_ != mouse_pos) {
last_mouse_pos_ = mouse_pos;
« no previous file with comments | « ui/views/controls/native/native_view_host_win.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698