Can we make Electron go full screen over the desktop, rather than separate space? (like iTerm)


#1

Like iTerm’s non-native full-screen mode, can we make Electron do this? I’d like to make Electron go full screen over the current desktop so that it is not on a separate space. iTerm has an option called “Native full screen windows” that when disabled causes iTerm to be on the same desktop as it was before when toggling on fullscreen, and it covers all the apps. It is possible to cmd-tab to get back to other apps (or use the expose to access windows on the same desktop without switching spaces).

It would be awesome to do this with an Electron app!


#2

You mean like the Zoom command iTerm2 offers?

IDK, but I always use spectacle when resizing windows. It does the same thing, plus a bunch of other window positions and sizes.


#3

No, I meant like the Native full screen windows option (when the check box is disabled). When you go “full screen”, iTerm will not go into a separate space, it will be something like “maximized”, except that it will cover all windows in the current space. So if I have only one desktop space, then after I go full screen in iTerm, I will still have only one desktop space, and iTerm will fill the entire screen. The macOS menu bar at the top will go into auto-hide mode, so while I’m in iTerm’s full screen mode, the macOS menu bar will slide out from the top if I move the mouse pointer to the top edge of the display.

Here’s some screenshots to show what I mean. In all of them, I am on “Desktop 2”:

1) iTerm taking up the whole screen (I’m on “Desktop 2”)

2) I’ve moved my mouse to the top of the display, and the macOS menu bar slid down.

3) I’ve opened Exposé. You can see that I have multiple apps on the same desktop as iTerm, and in the thumbnail you can see iTerm is currently covering the whole desktop (EDIT: macOS screenshots has a bug, the desktop thumbnails actually show empty desktops, but just imagine that “Desktop 2” looks like iTerm covering the whole thumbnail):

4) I’ve clicked on the Calculator app in Exposé, which took me out of Exposé, and now the Calculator app is on top of iTerm.

5) Now I’ve pressed cmd+tab to switch back to iTerm, which makes the Calculator app go behind iTerm, and I am back to the original image with iTerm covering the whole desktop:


#4

I believe you’re looking for the simpleFullscreen option in BrowserWindow.

Also available as a method at https://electronjs.org/docs/api/browser-window#winsetsimplefullscreenflag-macos.


#5

I just tested it with a bare-bones Electron app, like this:

	const options = {
		simpleFullscreen: true,
		fullscreen: true,
	}

	win = new BrowserWindow(options)

and it sent the window straight into its own space.

Even if that’s the option (and maybe I’m missing something or my version of Electron has a bug), how would I tell Atom to use that option aside from forking it?