summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/views/aero_tooltip_manager.cc5
-rw-r--r--chrome/views/aero_tooltip_manager.h3
-rw-r--r--chrome/views/container_win.cc1
-rw-r--r--chrome/views/tooltip_manager.h2
4 files changed, 10 insertions, 1 deletions
diff --git a/chrome/views/aero_tooltip_manager.cc b/chrome/views/aero_tooltip_manager.cc
index 7e665a1..5977644 100644
--- a/chrome/views/aero_tooltip_manager.cc
+++ b/chrome/views/aero_tooltip_manager.cc
@@ -58,6 +58,11 @@ void AeroTooltipManager::OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param) {
}
}
+void AeroTooltipManager::OnMouseLeave() {
+ last_mouse_x_ = last_mouse_y_ = -1;
+ UpdateTooltip();
+}
+
///////////////////////////////////////////////////////////////////////////////
// AeroTooltipManager, private:
diff --git a/chrome/views/aero_tooltip_manager.h b/chrome/views/aero_tooltip_manager.h
index 28edda7..3b7b99a 100644
--- a/chrome/views/aero_tooltip_manager.h
+++ b/chrome/views/aero_tooltip_manager.h
@@ -31,7 +31,8 @@ class AeroTooltipManager : public TooltipManager {
AeroTooltipManager(Container* container, HWND parent);
virtual ~AeroTooltipManager();
- void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param);
+ virtual void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param);
+ virtual void OnMouseLeave();
private:
void Init();
diff --git a/chrome/views/container_win.cc b/chrome/views/container_win.cc
index 43286fb..dc011742 100644
--- a/chrome/views/container_win.cc
+++ b/chrome/views/container_win.cc
@@ -532,6 +532,7 @@ void ContainerWin::OnMouseMove(UINT flags, const CPoint& point) {
}
LRESULT ContainerWin::OnMouseLeave(UINT uMsg, WPARAM w_param, LPARAM l_param) {
+ tooltip_manager_->OnMouseLeave();
ProcessMouseExited();
return 0;
}
diff --git a/chrome/views/tooltip_manager.h b/chrome/views/tooltip_manager.h
index 5050923..f1aab66a 100644
--- a/chrome/views/tooltip_manager.h
+++ b/chrome/views/tooltip_manager.h
@@ -76,6 +76,8 @@ class TooltipManager {
// Message handlers. These forward to the tooltip control.
virtual void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param);
LRESULT OnNotify(int w_param, NMHDR* l_param, bool* handled);
+ // Not used directly by TooltipManager, but provided for AeroTooltipManager.
+ virtual void OnMouseLeave() {}
protected:
virtual void Init();