-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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 bug report that matches the one I want to file, without success.
Electron Version
30.0.0-beta.7
What operating system are you using?
Windows
Operating System Version
Windows 11
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
A window with these properties:
frame: false,
backgroundMaterial: "mica",
// Setting WCO is optional but is the simplest way to access maximize and restore controls
titleBarStyle: "hidden",
titleBarOverlay: true
should be able to be maximized and restored/unmaximized with no detrimental effects.
Actual Behavior
When you maximize a frameless window with background material (whether through WCO titlebar controls or programmatically) it causes the following irreversible damage to the window:
- The background material disappears and cannot be re-applied
- The background colour goes pitch black and cannot be changed
- The window's rounded frame, border, shadows, and resize handles are gone when the window is restored
Restoring/unmaximizing the window does not bring back the original styles.
Testcase Gist URL
https://gist.github.com/mitchchn/f38fcd4fdb20e4453c90638ecd5face2
Additional Information
Frameless Mica windows use custom styles to achieve a "thin frame" appearance and I suspect these are being lost/mangled when the window is maximized, and are not being reset when the window is restored.
CC-ing @brhenrique who worked on some improvements to Mica windows without frames and may have some insight here.