-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Labels
35-x-y36-x-ybug 🪲has-repro-gistIssue can be reproduced with code at https://gist.github.com/Issue can be reproduced with code at https://gist.github.com/platform/windowsstatus/confirmedA maintainer reproduced the bug or agreed with the featureA maintainer reproduced the bug or agreed with the feature
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
35.2.1
What operating system(s) are you using?
Windows
Operating System Version
Windows 11 24H2
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
- The material effect (Acrylic/Mica) should persist in all maximize/restore scenarios.
- Rounded corners should remain consistent.
- Windows 11 should ideally support the all materials for better native integration.
Actual Behavior
Issue Description
As mentioned in issues #42393 and #41824, previous versions of Electron experienced a bug where the backgroundMaterial
effect (e.g., Acrylic/Mica) would disappear after maximizing a frameless window.
While the issue has been partially fixed for cases involving win.maximize()
and win.restore()
, the material effect still fails under other conditions.
Reproduction Cases
The behavior varies depending on how the window is maximized/restored:
- ✅ Works Correctly
- Clicking the maximize/restore buttons (
win.maximize()
/win.restore()
) retains the material effect.
- Clicking the maximize/restore buttons (
v1.mp4
- ❌ Drag to Maximize → Drag to Restore
- Dragging the window to the top (maximize) and then dragging it down (restore) causes:
- Material effect lost (incorrect background color)
- Rounded corners remain intact
- Dragging the window to the top (maximize) and then dragging it down (restore) causes:
v2.mp4
- ❌ Double-Click to Maximize → Double-Click to Restore
- Double-clicking the title bar to maximize and restore results in:
- Material effect lost (incorrect background color)
- Rounded corners remain intact
- Double-clicking the title bar to maximize and restore results in:
v3.mp4
- ❌ Click Maximize Button → Drag to Restore
- Clicking the maximize button (works correctly), then dragging to restore causes:
- Material effect lost
- Rounded corners also lost
- Clicking the maximize button (works correctly), then dragging to restore causes:
v4.mp4
⚠️ Click Maximize Button → Double-Click to Restore- Clicking the maximize button (works correctly), then double-clicking to restore:
- Material effect remains
- Rounded corners lost
- Clicking the maximize button (works correctly), then double-clicking to restore:
v5.mp4
Code Example
win = new BrowserWindow({
frame: false,
width: 1200,
height: 640,
minWidth: 800,
minHeight: 500,
backgroundMaterial: "acrylic", // Should also support "mica" for Win11
webPreferences: {
enableRemoteModule: true,
enableSmoothScrolling: true,
webSecurity: false,
devTools: true
}
});
📊 Behavior Summary Table
Action Sequence | Material Effect | Rounded Corners | Status |
---|---|---|---|
Maximize/Restore via buttons | ✅ Preserved | ✅ Preserved | Working |
Drag → Maximize → Drag → Restore | ❌ Lost (color breaks) | ✅ Preserved | Bug |
Double-click → Maximize → Double-click → Restore | ❌ Lost (color breaks) | ✅ Preserved | Bug |
Button Maximize → Drag Restore | ❌ Lost | ❌ Lost | Bug (worse) |
Button Maximize → Double-click Restore | ✅ Preserved | ❌ Lost | Partial Bug |
Testcase Gist URL
No response
Additional Information
No response
Metadata
Metadata
Assignees
Labels
35-x-y36-x-ybug 🪲has-repro-gistIssue can be reproduced with code at https://gist.github.com/Issue can be reproduced with code at https://gist.github.com/platform/windowsstatus/confirmedA maintainer reproduced the bug or agreed with the featureA maintainer reproduced the bug or agreed with the feature