mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
🐛 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user