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 7976bc458f7131398f43becc9722a1f33aa206f0..97b700e6c95ca37bd3f435c1bbf7451d8f46d29c 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 { |
@@ -19,6 +20,12 @@ namespace views { |
/////////////////////////////////////////////////////////////////////////////// |
// AeroTooltipManager, public: |
+void ScalePos(gfx::Point& pos) { |
+ float scale = ui::GetDPIScale(); |
+ pos.set_x(pos.x() / scale); |
+ pos.set_y(pos.y() / scale); |
+} |
+ |
AeroTooltipManager::AeroTooltipManager(Widget* widget) |
: TooltipManagerWin(widget), |
initial_delay_(0) { |
@@ -47,6 +54,7 @@ void AeroTooltipManager::OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param) { |
::MapWindowPoints(HWND_DESKTOP, GetParent(), &temp, 1); |
mouse_pos.SetPoint(temp.x, temp.y); |
} |
+ ScalePos( mouse_pos); |
if (last_mouse_pos_ != mouse_pos) { |
last_mouse_pos_ = mouse_pos; |
HideKeyboardTooltip(); |