Initialize wm::WMState on Windows as well

See:
cd4f72fdea/ui/views_content_client/views_content_client_main_parts_aura.cc (23)

This fixes electron/electron#9197.
This commit is contained in:
Birunthan Mohanathas 2017-04-16 17:27:36 +03:00
parent ba6f1f5443
commit ed9795514e
2 changed files with 6 additions and 3 deletions

View file

@ -25,6 +25,7 @@
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/views/widget/desktop_aura/desktop_screen.h"
#include "ui/wm/core/wm_state.h"
#endif
#if defined(TOOLKIT_VIEWS)
@ -41,7 +42,6 @@
#include "ui/base/x/x11_util.h"
#include "ui/base/x/x11_util_internal.h"
#include "ui/views/linux_ui/linux_ui.h"
#include "ui/wm/core/wm_state.h"
#endif
#if defined(OS_WIN)
@ -181,6 +181,9 @@ void BrowserMainParts::ToolkitInitialized() {
#if defined(USE_AURA) && defined(USE_X11)
views::LinuxUI::instance()->Initialize();
#endif
#if defined(USE_AURA)
wm_state_.reset(new wm::WMState);
#endif

View file

@ -19,7 +19,7 @@ class ViewsDelegate;
}
#endif
#if defined(USE_AURA) && defined(USE_X11)
#if defined(USE_AURA)
namespace wm {
class WMState;
}
@ -54,7 +54,7 @@ class BrowserMainParts : public content::BrowserMainParts {
std::unique_ptr<ViewsDelegate> views_delegate_;
#endif
#if defined(USE_AURA) && defined(USE_X11)
#if defined(USE_AURA)
std::unique_ptr<wm::WMState> wm_state_;
#endif