electron: Fullscreen on Mac still shows window title and kiosk mode not working
I have the following code that creates a fullscreen window on OS X
atom-shell: 0.20.7
app.on('ready', function() {
var Screen = require('screen');
var size = Screen.getPrimaryDisplay().size;
var width = size.width;
var height = size.height;
// Create the browser window.
mainWindow = new BrowserWindow({
'width': width,
'height': height,
'max-width': width,
'max-height': height,
'fullscreen': true,
'frame': false,
'kiosk': true,
'transparent': true,
'show': true,
'resizable': false
});
});
I have set the window to be the width and height of the window (this is because on OS X, you have a fullscreen API so windows can be fullscreen with any width or height.).
I have also set the window to be transparent, this is because if you hover your mouse over the menu bar then the window title slides down (grey with title). I have also disabled the frame to remove the shadows and rounded corners from the window.
However there are a couple of bugs:
1.) The window title bar still appears when you hover the menubar (even in transparent mode) the titlebar still appears (although the grey bar and title itself are removed).

2.) Is it possible to disable the menubar and dock when in fullscreen mode? I thought of using Kiosk mode, but even when I have that set to true, I can still access the menubar and dock! If I set the fullscreen to false then the kiosk mode works. It has to be set to false though, not setting the fullscreen option or setting it to null breaks the kiosk mode again.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 18 (4 by maintainers)
After looking into this, I’m afraid this looks more like a bug of OS X 10.10 to me, and since kiosk mode works perfectly OS X 10.11, I’m closing this as won’t fix.
I am doing a bit more testing on this. If I write a set timeout I can get the true fullscreen kiosk mode working on 10.10.5.
In my main app.js file I use:
With that the app launches, goes fullscreen and then the OS X menu bar and Dock are completely inaccessible. But the exact same app does not work if I use the
kiosk: truesetting in theBrowserWindowcall.I have found that modifying the Info.plist and adding:
Does what is intended for hiding both the taskbar and system menu bar and prevents them from being shown on hover.
However, once Electron is launched, if I drag a project (any project) to the Electron shell the menu and system bars will appear on hover, seemingly overriding the LSUIPresentationMode setting.
Electron: 34.2 OS: 10.10.4