| Index: ui/views/mouse_watcher.cc
|
| diff --git a/ui/views/mouse_watcher.cc b/ui/views/mouse_watcher.cc
|
| index 85941b5bdc95c81f27025bbd54d61f1d46d1bdce..676dc8bbca8e5425ca9a9048c9663c9819609c84 100644
|
| --- a/ui/views/mouse_watcher.cc
|
| +++ b/ui/views/mouse_watcher.cc
|
| @@ -39,6 +39,9 @@ class MouseWatcher::Observer : public ui::EventHandler {
|
| case ui::ET_MOUSE_EXITED:
|
| HandleMouseEvent(MouseWatcherHost::MOUSE_EXIT);
|
| break;
|
| + case ui::ET_MOUSE_PRESSED:
|
| + HandleMouseEvent(MouseWatcherHost::MOUSE_PRESS);
|
| + break;
|
| default:
|
| break;
|
| }
|
| @@ -52,9 +55,11 @@ class MouseWatcher::Observer : public ui::EventHandler {
|
| // It's safe to use last_mouse_location() here as this function is invoked
|
| // during event dispatching.
|
| if (!host()->Contains(EventMonitor::GetLastMouseLocation(), event_type)) {
|
| - // Mouse moved outside the host's zone, start a timer to notify the
|
| - // listener.
|
| - if (!notify_listener_factory_.HasWeakPtrs()) {
|
| + if (event_type == MouseWatcherHost::MOUSE_PRESS) {
|
| + NotifyListener();
|
| + } else if (!notify_listener_factory_.HasWeakPtrs()) {
|
| + // Mouse moved outside the host's zone, start a timer to notify the
|
| + // listener.
|
| base::MessageLoop::current()->PostDelayedTask(
|
| FROM_HERE,
|
| base::Bind(&Observer::NotifyListener,
|
|
|