8000 [Bug]: Windows 7 frame is shown on load with frame: false and resizable: false · Issue #30024 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug]: Windows 7 frame is shown on load with frame: false and resizable: false #30024
Closed
@facuparedes

Description

@facuparedes

Preflight Checklist

Electron Version

13.1.6

What operating system are you using?

Windows

Operating System Version

Windows 11 build 22000.51

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Show just a white (or a custom background color) window. Like this initial screen:

image

The screenshot was taken without frame: false and resizable: false:

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

function createWindow () {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
  });

  win.loadFile('index.html')
}

app.whenReady().then(() => {
  createWindow();
})

app.on('window-all-closed', function () {
  app.quit()
})

Actual Behavior

Windows 7 style frame is shown for a second when I create a BrowserWindow with frame: false and resizable: false

image

Testcase Gist URL

https://gist.github.com/facuparedes/97e6238ce8d5e132a0f03b4de3eb84a0

Additional Information

Maybe related to #30022

I found on Google a post made on 2019/04/11 about the issue: https://discuss.atom.io/t/windows-7-frame-is-shown-on-load-win-10/64339

However, that forum was deleted, so we can't see the full page. We can only see this: https://webcache.googleusercontent.com/search?q=cache:wB91NYnTYAIJ:https://discuss.atom.io/t/windows-7-frame-is-shown-on-load-win-10/64339+&cd=1&hl=en&ct=clnk&gl=ca

(Extracted from that URL)

When frame is set to false, an old windows native frame is shown just before app is loaded.

image

A workaround: set resizable: true (or remove it) and then change that with setResizable(). Like this:

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

function createWindow () {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    frame: false,
  });

  win.setResizable(false);
  win.loadFile('index.html')
}

app.whenReady().then(() => {
  createWindow();
})

app.on('window-all-closed', function () {
  app.quit()
})

Note at the win.setResizable(false); line.

Although this workaround fixes this issue, #30022 persists.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0