Merge pull request #5718 from felixrieseberg/windows-fullscreenable

Fix setFullscreen() on Windows
This commit is contained in:
Cheng Zhao 2016-05-30 00:08:16 +00:00
commit ec53e49fad
2 changed files with 8 additions and 2 deletions

View file

@ -142,6 +142,11 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
bool fullscreen = false;
if (options.Get(options::kFullscreen, &fullscreen) && !fullscreen)
fullscreenable = false;
// On Windows, we can only enter fullscreen via API
// Ensure that setFullscreen(true) is usable by default
#if defined(OS_WIN)
fullscreenable = true;
#endif
// Overriden by 'fullscreenable'.
options.Get(options::kFullScreenable, &fullscreenable);
SetFullScreenable(fullscreenable);