From c9371bceec1ae04686a0765eb850cb512981d028 Mon Sep 17 00:00:00 2001 From: Frank Hale Date: Wed, 12 Nov 2014 00:45:21 -0500 Subject: [PATCH] Force native window - Force native frame and suppress the Chromium default blue frame. This resolves issues with Windows systems that are running in VM's and cannot enable Aero Glass. Atom-Shell was adding the default Chromium blue frame even when frame was set to false in the BrowserWindow options. --- atom/browser/native_window_views.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 0a17b1787b..59de54bbf2 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -227,6 +227,11 @@ NativeWindowViews::NativeWindowViews(content::WebContents* web_contents, use_content_size_) bounds = ContentBoundsToWindowBounds(bounds); + if(has_frame_) { + window_->set_frame_type(views::Widget::FrameType::FRAME_TYPE_FORCE_NATIVE); + window_->FrameTypeChanged(); + } + window_->UpdateWindowIcon(); window_->CenterWindow(bounds.size()); Layout(); @@ -660,11 +665,9 @@ views::ClientView* NativeWindowViews::CreateClientView(views::Widget* widget) { views::NonClientFrameView* NativeWindowViews::CreateNonClientFrameView( views::Widget* widget) { #if defined(OS_WIN) - if (ui::win::IsAeroGlassEnabled()) { WinFrameView* frame_view = new WinFrameView; frame_view->Init(this, widget); return frame_view; - } #elif defined(OS_LINUX) if (has_frame_) { return new views::NativeFrameView(widget);