Description
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 a feature request that matches the one I want to file, without success.
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:
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
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.
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.