diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index bf58b2094dc3..75b8d556870d 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -537,6 +537,13 @@ views::NonClientFrameView* NativeWindowViews::CreateNonClientFrameView( return NULL; } +void NativeWindowViews::HandleMouseDown() { + if (menu_bar_autohide_ && menu_bar_show_) { + SetMenuBarVisibility(false); + Layout(); + } +} + void NativeWindowViews::HandleKeyboardEvent( content::WebContents*, const content::NativeWebKeyboardEvent& event) { diff --git a/atom/browser/native_window_views.h b/atom/browser/native_window_views.h index d4292191c7bd..0381a9bd05e9 100644 --- a/atom/browser/native_window_views.h +++ b/atom/browser/native_window_views.h @@ -107,6 +107,7 @@ class NativeWindowViews : public NativeWindow, views::Widget* widget) OVERRIDE; // content::WebContentsDelegate: + virtual void HandleMouseDown() OVERRIDE; virtual void HandleKeyboardEvent( content::WebContents*, const content::NativeWebKeyboardEvent& event) OVERRIDE;