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

Unified Diff: ui/views/corewm/tooltip_controller.cc

Issue 23477022: Two changes to desktop aura for tooltips: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2013 Created 7 years, 4 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/aura/test/event_generator.cc ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/tooltip_controller.cc
diff --git a/ui/views/corewm/tooltip_controller.cc b/ui/views/corewm/tooltip_controller.cc
index 7e3d262b4f48729d0ffa8f156bdcd9ac0f53cb64..1c17d916bbaf87fbfbbbc64af8bc3e930c9a6fdf 100644
--- a/ui/views/corewm/tooltip_controller.cc
+++ b/ui/views/corewm/tooltip_controller.cc
@@ -256,13 +256,17 @@ void TooltipController::OnKeyEvent(ui::KeyEvent* event) {
void TooltipController::OnMouseEvent(ui::MouseEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
switch (event->type()) {
+ case ui::ET_MOUSE_EXITED:
+ target = NULL;
+ // Fall through.
case ui::ET_MOUSE_MOVED:
case ui::ET_MOUSE_DRAGGED:
if (tooltip_window_ != target) {
if (tooltip_window_)
tooltip_window_->RemoveObserver(this);
tooltip_window_ = target;
- tooltip_window_->AddObserver(this);
+ if (tooltip_window_)
+ tooltip_window_->AddObserver(this);
}
curr_mouse_loc_ = event->location();
if (tooltip_timer_.IsRunning())
« no previous file with comments | « ui/aura/test/event_generator.cc ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698