New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting window to fullscreen, when resizing is disabled, breaks fullscreen functionality #8166

Closed
timothyis opened this Issue Dec 8, 2016 · 2 comments

Comments

Projects
None yet
5 participants
@timothyis

timothyis commented Dec 8, 2016

  • Electron version: 1.4.8
  • Operating system: OS X El Capitan (v10.11.6)

Expected behavior

Setting a window to fullscreen via win.setFullScreen(true) in an event should make the window fullscreen with the window increasing its size to fill the screen.

Actual behavior

Setting a window to fullscreen via win.setFullScreen(true) in an event makes a new desktop as any Mac window should when going fullscreen but the window says at its initial size when resizable is set to false upon window creation.

How to reproduce

  • Create a BrowserWindow at any size but define resizable: false in the options.
  • Create a function that detects win.isFullScreen() and either setFullScreen to true or false depending on the state and make that toggle-able within the app.
  • Toggle fullscreen and see that the size of the window does not change but the window does create a new desktop.

Additional Information

Please ignore the title in this next screenshot. I re-utilised an app from before
image
This screenshot is of a test fullscreen application with resizable set to false.
However, as a workaround I can use this:

if (postRecWindow.isFullScreen()) {
  postRecWindow.setFullScreen(false);
  postRecWindow.setResizable(false);
} else {
  postRecWindow.setResizable(true);
  postRecWindow.setFullScreen(true);
}

But I assume this is not the expected behaviour for fullscreen when resizable is false 🤔

@sindresorhus

This comment has been minimized.

Contributor

sindresorhus commented Dec 8, 2016

Seems similar to #5918. I totally agree it's not the expected behavior.

@timothyis

This comment has been minimized.

timothyis commented Dec 21, 2016

In addition to this, resizing also has to be set to true in order for win.maximize() to work as intended. I think that's just an extension of this issue, though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment