diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-27 23:51:39 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-27 23:51:39 +0000 |
commit | 387f92a93e21e1fe1ef0ad9986b5751a847a2806 (patch) | |
tree | ce69fedb034b31911493c4dcec601784e8452171 /ui/views/window | |
parent | 78a8a2ad5f8e7f8ce6a196429be8f11475dd075b (diff) | |
download | chromium_src-387f92a93e21e1fe1ef0ad9986b5751a847a2806.zip chromium_src-387f92a93e21e1fe1ef0ad9986b5751a847a2806.tar.gz chromium_src-387f92a93e21e1fe1ef0ad9986b5751a847a2806.tar.bz2 |
Aura: Support hovering restore & close buttons for full screen apps.
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/9359022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/window')
-rw-r--r-- | ui/views/window/non_client_view.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc index c880414..9d37b5f 100644 --- a/ui/views/window/non_client_view.cc +++ b/ui/views/window/non_client_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -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); } |