Repository navigation
Labels
35-x-y36-x-ybug 🪲has-repro-gistIssue can be reproduced with code at https://gist.github.com/platform/windowsstatus/confirmedA 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/platform/windowsstatus/confirmedA maintainer reproduced the bug or agreed with the feature
Type
Projects
- StatusShow more project fields👀 Unsorted Items
- StatusShow more project fields👍 Does Not Block Stable
Activity
nikwen commentedon Apr 24, 2025
Thanks for the super helpful overview! This is great.
Could you please upload your example code as a gist made with Electron Fiddle? This allows team members to quickly reproduce the issue and subsequently fix it.
electron-issue-triage commentedon Apr 24, 2025
Hello @aleversn. Thanks for reporting this and helping to make Electron better!
Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.
Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
Now adding the blocked/need-reproNeeds a test case to reproduce the bug
label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.
aleversn commentedon Apr 24, 2025
Sure, I have made a simple demo and published it in the Gist.
rasterdds commentedon Apr 27, 2025
There are also a fullscreen bug related to same issue here
If the window goes into fullscreen mode while not maximized, the corners remain rounded and the window border is not hidden
zoy-l commentedon Apr 28, 2025
I can try to completely solve this problem, but I still need to continue verifying if there are any side effects.
20250429-012926.mp4
PixelBedrock commentedon May 30, 2025
bumping this as @zoy-l closed their pull request (see #46855)
hopejr commentedon Jun 4, 2025
In your video, are you actually clicking the close button to maximise/restore the window?
zoy-l commentedon Jun 4, 2025
@hopejr No, it's just that I was too lazy to write an event handler, so I used the close button instead.
hopejr commentedon Jun 4, 2025
Is there a reason why the actual Maximise button is missing? I've got that happening on one of my projects, but can't replicate it in a gist.
zoy-l commentedon Jun 5, 2025
When this issue is fixed, it should be resolved as well~
This was actually resolved in PR #46855, but I'm currently too busy and don’t have the extra energy to continue tracking it through to merge🫠. However, it should be resolved before long.