summaryrefslogtreecommitdiffstats
path: root/views/window/non_client_view.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-06 05:15:03 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-06 05:15:03 +0000
commit06f35a420e28433170a6c25ac36e21683b8a4430 (patch)
treeba97fcf6f966ad3f5b8bc95143f687e83a2bdf93 /views/window/non_client_view.cc
parent6d01474a4466109350986371be9aeb5bfda1eecc (diff)
downloadchromium_src-06f35a420e28433170a6c25ac36e21683b8a4430.zip
chromium_src-06f35a420e28433170a6c25ac36e21683b8a4430.tar.gz
chromium_src-06f35a420e28433170a6c25ac36e21683b8a4430.tar.bz2
Rework nonclient hittest plumbing so the NonClientFrameView is responsible for the whole window's hit testing. Make use of this in the glass frame to add support for HTSYSMENU. Doing this in the opaque frame will be more complex, so that's coming next.
BUG=6961 TEST=Single- and double-clicks on the upper left corner of a Chrome window in Aero glass mode should trigger the system menu and the window closing, respectively. Review URL: http://codereview.chromium.org/573042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window/non_client_view.cc')
-rw-r--r--views/window/non_client_view.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/views/window/non_client_view.cc b/views/window/non_client_view.cc
index 23fda99..fcf4353 100644
--- a/views/window/non_client_view.cc
+++ b/views/window/non_client_view.cc
@@ -92,18 +92,7 @@ gfx::Rect NonClientView::GetWindowBoundsForClientBounds(
}
int NonClientView::NonClientHitTest(const gfx::Point& point) {
- // Sanity check.
- if (!bounds().Contains(point))
- return HTNOWHERE;
-
- // The ClientView gets first crack, since it overlays the NonClientFrameView
- // in the display stack.
- int frame_component = client_view_->NonClientHitTest(point);
- if (frame_component != HTNOWHERE)
- return frame_component;
-
- // Finally ask the NonClientFrameView. It's at the back of the display stack
- // so it gets asked last.
+ // The NonClientFrameView is responsible for also asking the ClientView.
return frame_view_->NonClientHitTest(point);
}