diff options
Diffstat (limited to 'views/window/custom_frame_view.cc')
-rw-r--r-- | views/window/custom_frame_view.cc | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc index 5f62219..e67a5c2 100644 --- a/views/window/custom_frame_view.cc +++ b/views/window/custom_frame_view.cc @@ -17,6 +17,7 @@ #include "grit/app_resources.h" #include "grit/app_strings.h" #include "views/window/client_view.h" +#include "views/window/window_shape.h" #if defined(OS_LINUX) #include "views/window/hit_test.h" #endif @@ -187,27 +188,10 @@ int CustomFrameView::NonClientHitTest(const gfx::Point& point) { void CustomFrameView::GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) { DCHECK(window_mask); - if (frame_->IsMaximized()) return; - // Redefine the window visible region for the new size. - window_mask->moveTo(0, 3); - window_mask->lineTo(1, 2); - window_mask->lineTo(1, 1); - window_mask->lineTo(2, 1); - window_mask->lineTo(3, 0); - - window_mask->lineTo(SkIntToScalar(size.width() - 3), 0); - window_mask->lineTo(SkIntToScalar(size.width() - 2), 1); - window_mask->lineTo(SkIntToScalar(size.width() - 1), 1); - window_mask->lineTo(SkIntToScalar(size.width() - 1), 2); - window_mask->lineTo(SkIntToScalar(size.width()), 3); - - window_mask->lineTo(SkIntToScalar(size.width()), - SkIntToScalar(size.height())); - window_mask->lineTo(0, SkIntToScalar(size.height())); - window_mask->close(); + views::GetDefaultWindowMask(size, window_mask); } void CustomFrameView::EnableClose(bool enable) { |