Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm |
| diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm |
| index 5eaf26d1d1b176bfc5e37e8b70eaa7189c5bb33f..e7de1ed417159445864f78ff76db1330d1841c7e 100644 |
| --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm |
| +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm |
| @@ -69,7 +69,15 @@ gfx::Rect BrowserNonClientFrameViewMac::GetWindowBoundsForClientBounds( |
| } |
| int BrowserNonClientFrameViewMac::NonClientHitTest(const gfx::Point& point) { |
| - return frame()->client_view()->NonClientHitTest(point); |
| + int component = frame()->client_view()->NonClientHitTest(point); |
|
tapted
2015/06/03 00:28:37
maybe we need to encode the close/minimize button
jackhou1
2015/06/03 04:04:44
I was thinking we could do our own NSView hit-test
|
| + |
| + // BrowserView::NonClientHitTest will return HTNOWHERE for points that hit |
| + // the native title bar. On Mac, we need to explicitly return HTCAPTION for |
| + // those points. |
| + if (component == HTNOWHERE && bounds().Contains(point)) |
| + return HTCAPTION; |
| + |
| + return component; |
| } |
| void BrowserNonClientFrameViewMac::GetWindowMask(const gfx::Size& size, |