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

BrowserWindow transparency/vibrancy is lost after refresh when app.allowRendererProcessReuse = false #25547

Open
3 tasks done
KishanBagaria opened this issue Sep 20, 2020 · 1 comment

Comments

@KishanBagaria
Copy link

@KishanBagaria KishanBagaria commented Sep 20, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version: 10.1.1
  • Operating System: macOS 10.15
  • Last Known Working Electron version: None

Actual Behavior

Vibrancy and transparency is lost after refreshing (⌘ R) when app.allowRendererProcessReuse = false

This also happens in certain unknown cases without refreshing.

It doesn't happen when app.allowRendererProcessReuse = true

Screencast

electron-vibrancy-bug

To Reproduce

main.js:

const {app, BrowserWindow} = require('electron')

app.allowRendererProcessReuse = false

function createWindow () {
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    // titleBarStyle: 'hiddenInset',
    // vibrancy: 'sidebar',
    transparent: true,
    backgroundColor: '#00000000',
    webPreferences: {
      nodeIntegration: true
    }
  })
  mainWindow.loadFile('index.html')
}
app.on('ready', createWindow)

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

app.on('activate', function () {
  if (BrowserWindow.getAllWindows().length === 0) {
    createWindow()
  }
})

index.html:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <style>
      html { -webkit-app-region: drag; height: 100% }
      body { margin: 2em }
    </style>
  </head>
  <body>
    We are using Node.js <script>document.write(process.versions.node)</script>,
    Chromium <script>document.write(process.versions.chrome)</script>,
    and Electron <script>document.write(process.versions.electron)</script>.
  </body>
</html>

Additional Information

Likely related to #8310.

I'd keep allowRendererProcessReuse = true but then I encounter #25311

@TanninOne
Copy link
Contributor

@TanninOne TanninOne commented Apr 1, 2021

This also happens on windows in electron 11.4.1

@nornagon nornagon added the 11-x-y label Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants