From 23951e6ef37e544a42fa346b9fffeae585f3869f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 15 Dec 2014 16:46:37 -0800 Subject: [PATCH] views: Implement CanMinimize, fixes #918 --- atom/browser/native_window_views.cc | 4 ++++ atom/browser/native_window_views.h | 1 + 2 files changed, 5 insertions(+) diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 0d00f40399ce..d9f476b03ca9 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -672,6 +672,10 @@ bool NativeWindowViews::CanMaximize() const { return resizable_; } +bool NativeWindowViews::CanMinimize() const { + return true; +} + base::string16 NativeWindowViews::GetWindowTitle() const { return base::UTF8ToUTF16(title_); } diff --git a/atom/browser/native_window_views.h b/atom/browser/native_window_views.h index 4f641b463139..2066d4e603d1 100644 --- a/atom/browser/native_window_views.h +++ b/atom/browser/native_window_views.h @@ -98,6 +98,7 @@ class NativeWindowViews : public NativeWindow, views::View* GetInitiallyFocusedView() override; bool CanResize() const override; bool CanMaximize() const override; + bool CanMinimize() const override; base::string16 GetWindowTitle() const override; bool ShouldHandleSystemCommands() const override; gfx::ImageSkia GetWindowAppIcon() override;