Skip to content

Windows 11: Material (Acrylic/Mica) and Rounded Corners Inconsistencies in Frameless BrowserWindow Maximize/Restore Actions #46753

Closed

Description

@aleversn

Preflight Checklist

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:

  1. ✅ Works Correctly
    • Clicking the maximize/restore buttons (win.maximize() / win.restore()) retains the material effect.
v1.mp4
  1. ❌ 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
v2.mp4
  1. ❌ 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
v3.mp4
  1. ❌ Click Maximize Button → Drag to Restore
    • Clicking the maximize button (works correctly), then dragging to restore causes:
      • Material effect lost
      • Rounded corners also lost
v4.mp4
  1. ⚠️ Click Maximize Button → Double-Click to Restore
    • Clicking the maximize button (works correctly), then double-clicking to restore:
      • Material effect remains
      • Rounded corners lost
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

Activity

  1. added theissue type on Apr 24, 2025
  2. moved this to 👀 Unsorted Items in 35-x-yon Apr 24, 2025
  3. nikwen commented on Apr 24, 2025

    @nikwen
    Member

    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.

  4. added
    blocked/need-repro
    on Apr 24, 2025
  5. electron-issue-triage commented on Apr 24, 2025

    @electron-issue-triage

    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-repro Needs 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.

  6. aleversn commented on Apr 24, 2025

    @aleversn
    Author

    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.

    Sure, I have made a simple demo and published it in the Gist.

  7. removed
    blocked/need-repro
    on Apr 24, 2025
  8. self-assigned this
    on Apr 24, 2025
  9. added
    status/confirmed
    on Apr 24, 2025
  10. moved this to 👀 Unsorted Items in 36-x-yon Apr 24, 2025
  11. added
    has-repro-gist
    on Apr 24, 2025
  12. rasterdds commented on Apr 27, 2025

    @rasterdds

    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

  13. zoy-l commented on Apr 28, 2025

    @zoy-l
    Contributor

    I can try to completely solve this problem, but I still need to continue verifying if there are any side effects.

    20250429-012926.mp4
  14. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 36-x-yon Apr 30, 2025
  15. PixelBedrock commented on May 30, 2025

    @PixelBedrock

    bumping this as @zoy-l closed their pull request (see #46855)

  16. hopejr commented on Jun 4, 2025

    @hopejr

    I can try to completely solve this problem, but I still need to continue verifying if there are any side effects.

    20250429-012926.mp4

    In your video, are you actually clicking the close button to maximise/restore the window?

  17. zoy-l commented on Jun 4, 2025

    @zoy-l
    Contributor

    @hopejr No, it's just that I was too lazy to write an event handler, so I used the close button instead.

    mainWindow.on("close", (event)=>{
        event.preventDefault()
       ...
    })
  18. hopejr commented on Jun 4, 2025

    @hopejr

    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.

  19. zoy-l commented on Jun 5, 2025

    @zoy-l
    Contributor

    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.

    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.

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

Metadata

Metadata

Assignees

Labels

35-x-y36-x-ybug 🪲has-repro-gistplatform/windowsstatus/confirmed

Type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions