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

Unified Diff: ui/aura/window_tree_host.cc

Issue 344793013: Dispatch a synthetic mouse exit to the widget handling mouse events when a widget grabs capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index 9ac7cf7ab0182634013b2794ca9716ea9692330f..5565f1033f1668681eac8e90195b5c316dad71eb 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -150,8 +150,10 @@ void WindowTreeHost::OnCursorVisibilityChanged(bool show) {
// visible because that can only happen in response to a mouse event, which
// will trigger its own mouse enter.
if (!show) {
- dispatcher()->DispatchMouseExitAtPoint(
+ ui::EventDispatchDetails details = dispatcher()->DispatchMouseExitAtPoint(
dispatcher()->GetLastMouseLocationInRoot());
+ if (details.dispatcher_destroyed)
+ return;
}
OnCursorVisibilityChangedNative(show);

Powered by Google App Engine
This is Rietveld 408576698