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

[Bug]: Frameless window has sharp corners on Win11 when not resizable #32981

Closed
3 tasks done
jonasmusall opened this issue Feb 18, 2022 · 4 comments
Closed
3 tasks done

Comments

@jonasmusall
Copy link

jonasmusall commented Feb 18, 2022

Preflight Checklist

Electron Version

17.0.1

What operating system are you using?

Windows

Operating System Version

Windows 11 Education (Build 22000.527)

What arch are you using?

x64

Last Known Working Electron version

17.0.0

Expected Behavior

A window with options resizable: false, frame: false should have the default Win11 rounded corners.

grafik

Actual Behavior

Frameless windows have sharp corners if resizable is set to false. Happens if created with resizable: false or calling setResizable(false) at any point after creation.

grafik

Testcase Gist URL

https://gist.github.com/jonasmusall/aa0116672e17962f00c62f8c96db2ec1

Additional Information

No response

@jonasmusall
Copy link
Author

Maybe this has to do with a23c93a?

@juninholiveira
Copy link

Having this same problem. Right now, the workaround I found is the following:

mainWindow = new BrowserWindow({ width: 500, height: 800, frame: false, resizable: true, minWidth: 500, maxWidth: 500, minHeight: 800, maxHeight: 800 })

This way, the frame is resizable, but when clicking and dragging the window won't be resized because of the min and max limits. But the cursor will change to the resizing one, unfortunately.

Of course, this is just a workaround, the ideal solution would be to fix this bug.

@mitchchn
Copy link
Contributor

mitchchn commented Mar 31, 2022

Hey @codebytere, I don't know if you've had a chance to look at this yet, but I'd like to propose reverting #32692.

The bug which it fixes is easily avoided by hiding the window until ready-to-show is fired, which is a best practice that's already recommended by the Electron docs to make windows load smoothly.

On the other hand, the bugs it introduces are not possible to work around by any means, including this issue and #32993.

Please let me know if you think reverting that MR would be acceptable. I am happy to open the MR.

@miniak
Copy link
Contributor

miniak commented Apr 7, 2022

@MarshallOfSound should we close this one as the PR was merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants