Merge pull request #5718 from felixrieseberg/windows-fullscreenable
Fix setFullscreen() on Windows
This commit is contained in:
commit
ec53e49fad
2 changed files with 8 additions and 2 deletions
|
@ -142,6 +142,11 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
||||||
bool fullscreen = false;
|
bool fullscreen = false;
|
||||||
if (options.Get(options::kFullscreen, &fullscreen) && !fullscreen)
|
if (options.Get(options::kFullscreen, &fullscreen) && !fullscreen)
|
||||||
fullscreenable = false;
|
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'.
|
// Overriden by 'fullscreenable'.
|
||||||
options.Get(options::kFullScreenable, &fullscreenable);
|
options.Get(options::kFullScreenable, &fullscreenable);
|
||||||
SetFullScreenable(fullscreenable);
|
SetFullScreenable(fullscreenable);
|
||||||
|
|
|
@ -59,8 +59,9 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||||
* `fullscreen` Boolean - Whether the window should show in fullscreen. When
|
* `fullscreen` Boolean - Whether the window should show in fullscreen. When
|
||||||
explicitly set to `false` the fullscreen button will be hidden or disabled
|
explicitly set to `false` the fullscreen button will be hidden or disabled
|
||||||
on OS X. Default is `false`.
|
on OS X. Default is `false`.
|
||||||
* `fullscreenable` Boolean - Whether the maximize/zoom button on OS X should
|
* `fullscreenable` Boolean - Whether the window can be put into fullscreen
|
||||||
toggle full screen mode or maximize window. Default is `true`.
|
mode. On OS X, also whether the maximize/zoom button should toggle full
|
||||||
|
screen mode or maximize window. Default is `true`.
|
||||||
* `skipTaskbar` Boolean - Whether to show the window in taskbar. Default is
|
* `skipTaskbar` Boolean - Whether to show the window in taskbar. Default is
|
||||||
`false`.
|
`false`.
|
||||||
* `kiosk` Boolean - The kiosk mode. Default is `false`.
|
* `kiosk` Boolean - The kiosk mode. Default is `false`.
|
||||||
|
|
Loading…
Add table
Reference in a new issue