Skip to content
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

menubar reappears after going out of fullscreen #20237

Closed
coreybruce opened this issue Sep 15, 2019 · 5 comments
Closed

menubar reappears after going out of fullscreen #20237

coreybruce opened this issue Sep 15, 2019 · 5 comments

Comments

@coreybruce
Copy link

Menubar bug that I have seen present since Electron 5.x.x, if you use mainWindow.setMenuBarVisibility(false) to hide the menu the menu will reappear if you go into fullscreen than out of fullscreen from a web video for example instead of staying forcefully hidden.

Electron 6.0.7
Manjaro XFCE
Was working on Electron 4.x.x and never re showed the menubar

If you use this code for example and go into a youtube video and fullescreen the video than go out you will see the menubar reappear.

var app = require('electron').app
var BrowserWindow = require('electron').BrowserWindow
var mainWindow

app.on('window-all-closed', function() {
  if (process.platform != 'darwin')
  app.quit()
})

//app.disableHardwareAcceleration()
app.on('ready', function() {
  mainWindow = new BrowserWindow({width: 1300, height: 900,icon: __dirname + '/icon.png'})
  mainWindow.setMenuBarVisibility(false)
  mainWindow.loadURL('file://' + __dirname + '/index.html') // Load splash screen
  mainWindow.maximize() // start maximized
  setTimeout(function () {
    mainWindow.loadURL('https://youtube.com/')
  }, 3000) // Load store page after 3 secs

  // Emitted when the window is closed.
  mainWindow.on('closed', function() {
    mainWindow = null;
  })

  mainWindow.webContents.on('new-window', (event, url) => {
    event.preventDefault()
    let pSize = mainWindow.getSize()
    const win = new BrowserWindow({ width: pSize[0], height: pSize[1]})
    win.loadURL(url)
    event.newGuest = win
  })
})
@James-Livesey
Copy link

Tested on both Windows 10 and Linux (Debian using Chrome OS Crostini), can confirm it appears to only happen in Linux.

@coreybruce
Copy link
Author

coreybruce commented Feb 25, 2020

Seems to be a issue with the code but is fixed on newer version 7.x.x and up

@electron-triage
Copy link

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know.

Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated.

@krassowski
Copy link

krassowski commented Sep 26, 2021

I am still seeing this issue on Linux (Ubuntu) with Electron 10.x. I guess 10.x it is not a supported version any longer, but just to put the records straight it does not seem to be fixed on 7.x for me; for a simple workaround see jupyterlab/jupyterlab-desktop@12819f9.

Edit: this was also reported in #19426.

@coreybruce
Copy link
Author

I am still seeing this issue on Linux (Ubuntu) with Electron 10.x. I guess 10.x it is not a supported version any longer, but just to put the records straight it does not seem to be fixed on 7.x for me; for a simple workaround see jupyterlab/jupyterlab_app@12819f9.

Edit: this was also reported in #19426.

Move to the newer version of Electron, you should always stick to the newest version for security, patches and fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
6.1.x
Unsorted Issues
Development

No branches or pull requests

5 participants