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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 454053004: Added comments in the WindowEventDispatcher::OnOtherRootGotCapture function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index eb08269c95bc94138074385699a928d294916208..e100bc82bdf810db4cb4f4c54445cea0a408144b 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -391,8 +391,12 @@ void WindowEventDispatcher::UpdateCapture(Window* old_capture,
}
void WindowEventDispatcher::OnOtherRootGotCapture() {
- // Sending the mouse exit causes bugs on Windows (e.g. crbug.com/394672).
- // TODO(pkotwicz): Fix the bugs and send mouse exit on Windows too.
+ // Windows provides the TrackMouseEvents API which allows us to rely on the
+ // OS to send us the mouse exit events (WM_MOUSELEAVE). Additionally on
+ // desktop Windows, every top level window could potentially have its own
+ // root window, in which case this function will get called whenever those
+ // windows grab mouse capture. Sending mouse exit messages in these cases
+ // causes subtle bugs like (crbug.com/394672).
#if !defined(OS_WIN)
if (mouse_moved_handler_) {
// Dispatch a mouse exit to reset any state associated with hover. This is
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698