Commit dd4fdd8f authored by ananta@chromium.org's avatar ananta@chromium.org

Added comments in the WindowEventDispatcher::OnOtherRootGotCapture function.

This is to clarify why we should not be dispatching synthetic mouse exit events on
Windows.

BUG=394672
R=sky

Review URL: https://codereview.chromium.org/454053004

Cr-Commit-Position: refs/heads/master@{#288970}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288970 0039d316-1c4b-4281-b951-d872f2087c98
parent 35103c00
...@@ -391,8 +391,12 @@ void WindowEventDispatcher::UpdateCapture(Window* old_capture, ...@@ -391,8 +391,12 @@ void WindowEventDispatcher::UpdateCapture(Window* old_capture,
} }
void WindowEventDispatcher::OnOtherRootGotCapture() { void WindowEventDispatcher::OnOtherRootGotCapture() {
// Sending the mouse exit causes bugs on Windows (e.g. crbug.com/394672). // Windows provides the TrackMouseEvents API which allows us to rely on the
// TODO(pkotwicz): Fix the bugs and send mouse exit on Windows too. // 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 !defined(OS_WIN)
if (mouse_moved_handler_) { if (mouse_moved_handler_) {
// Dispatch a mouse exit to reset any state associated with hover. This is // Dispatch a mouse exit to reset any state associated with hover. This is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment