🐛 Fix setFullscreen() on Windows
This ensures that a BrowserWindow responds to `setFullscreen(true)` if `full screenable` was not defined during creation. This bug was on Windows only.
This commit is contained in:
parent
570dc7ca9b
commit
836f8ab33c
2 changed files with 8 additions and 2 deletions
|
@ -146,6 +146,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue