win: Fix window frame when DWM is disabled, closes #519.
This commit is contained in:
parent
009e0790fe
commit
a8cd101ff5
1 changed files with 8 additions and 5 deletions
|
@ -45,6 +45,7 @@
|
||||||
#elif defined(OS_WIN)
|
#elif defined(OS_WIN)
|
||||||
#include "atom/browser/ui/views/win_frame_view.h"
|
#include "atom/browser/ui/views/win_frame_view.h"
|
||||||
#include "base/win/scoped_comptr.h"
|
#include "base/win/scoped_comptr.h"
|
||||||
|
#include "ui/base/win/shell.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
@ -480,9 +481,11 @@ views::ClientView* NativeWindowViews::CreateClientView(views::Widget* widget) {
|
||||||
views::NonClientFrameView* NativeWindowViews::CreateNonClientFrameView(
|
views::NonClientFrameView* NativeWindowViews::CreateNonClientFrameView(
|
||||||
views::Widget* widget) {
|
views::Widget* widget) {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
|
if (ui::win::IsAeroGlassEnabled()) {
|
||||||
WinFrameView* frame_view = new WinFrameView;
|
WinFrameView* frame_view = new WinFrameView;
|
||||||
frame_view->Init(this, widget);
|
frame_view->Init(this, widget);
|
||||||
return frame_view;
|
return frame_view;
|
||||||
|
}
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
if (has_frame_) {
|
if (has_frame_) {
|
||||||
return new views::NativeFrameView(widget);
|
return new views::NativeFrameView(widget);
|
||||||
|
@ -491,9 +494,9 @@ views::NonClientFrameView* NativeWindowViews::CreateNonClientFrameView(
|
||||||
frame_view->Init(this, widget);
|
frame_view->Init(this, widget);
|
||||||
return frame_view;
|
return frame_view;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowViews::HandleKeyboardEvent(
|
void NativeWindowViews::HandleKeyboardEvent(
|
||||||
|
|
Loading…
Reference in a new issue