From c9371bceec1ae04686a0765eb850cb512981d028 Mon Sep 17 00:00:00 2001 From: Frank Hale Date: Wed, 12 Nov 2014 00:45:21 -0500 Subject: [PATCH 1/2] 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 0a17b1787b52..59de54bbf2f0 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); From e9636bb87bcc2b31428d55da4237b4c2dfce2a1d Mon Sep 17 00:00:00 2001 From: Frank Hale Date: Wed, 12 Nov 2014 01:11:25 -0500 Subject: [PATCH 2/2] Fix CPP formatting --- atom/browser/native_window_views.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 348f3ab332ed..46b3dae3f4d9 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -237,7 +237,7 @@ NativeWindowViews::NativeWindowViews(content::WebContents* web_contents, } #endif - if(has_frame_) { + if (has_frame_) { window_->set_frame_type(views::Widget::FrameType::FRAME_TYPE_FORCE_NATIVE); window_->FrameTypeChanged(); }