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

Unified Diff: ui/views/window/non_client_view.cc

Issue 9359022: Aura: Support hovering restore & close buttons for full screen apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_test Created 8 years, 10 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/views/widget/native_widget_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/non_client_view.cc
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc
index c880414ef2e6278b1763005b3518a8ede724aa37..b6def60cc9332fd437ceb7c232b07f3fd99ee20a 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -168,10 +168,15 @@ views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) {
// detect this condition and re-route the events to the non-client frame view.
// The assumption is that the frame view's implementation of HitTest will only
// return true for area not occupied by the client view.
- gfx::Point point_in_child_coords(point);
- View::ConvertPointToView(this, frame_view_.get(), &point_in_child_coords);
- if (frame_view_->HitTest(point_in_child_coords))
- return frame_view_->GetEventHandlerForPoint(point_in_child_coords);
+ if (frame_view_->parent() == this) {
+ // During the reset of the frame_view_ it's possible to be in this code
+ // after it's been removed from the view hierarchy but before it's been
+ // removed from the NonClientView.
+ gfx::Point point_in_child_coords(point);
+ View::ConvertPointToView(this, frame_view_.get(), &point_in_child_coords);
+ if (frame_view_->HitTest(point_in_child_coords))
+ return frame_view_->GetEventHandlerForPoint(point_in_child_coords);
+ }
return View::GetEventHandlerForPoint(point);
}
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698