Skip to content

[Bug]: setBackgroundMaterial does not work #43345

Closed

Description

@kingyue737

Preflight Checklist

Electron Version

31.1.4

What operating system(s) are you using?

Windows

Operating System Version

Windows 23H2 22631.4037

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

win.setBackgroundMaterial('mica') should apply material background effect to window.

Actual Behavior

Nothing happened. Neither do others like 'tabbed' or 'acylic'

Testcase Gist URL

https://gist.github.com/kingyue737/d2ca0f1d5318f5915538cb05879bfb81

Additional Information

No response

Activity

  1. moved this to 👀 Unsorted Items in 31-x-yon Aug 18, 2024
  2. codebytere commented on Aug 18, 2024

    @codebytere
    Member

    @kingyue737 yes - it is win.setBackgroundMaterial('mica'). I believe you may erroneously have included an extra set in the call. If this is not the case, please include a reproducible sample for us to continue triage as we've tested this extensively on Windows and it has worked as expected thus far.

  3. added
    blocked/need-info ❌
    on Aug 18, 2024
  4. changed the title [-][Bug]: `setsetBackgroundMaterial` does not work[/-] [+][Bug]: `setBackgroundMaterial` does not work[/+] on Aug 19, 2024
  5. kingyue737 commented on Aug 19, 2024

    @kingyue737
    Author

    @codebytere Sorry I forgot the reproduction: https://gist.github.com/kingyue737/d2ca0f1d5318f5915538cb05879bfb81

    As I stated before, the only thing I did was add mainWindow.setBackgroundMaterial('mica') which does not work.

  6. kingyue737 commented on Aug 22, 2024

    @kingyue737
    Author

    To be specific, you can't set the background material of a window if its initial background material is none or undefined.

    And I found if the initial background material of a window is not none, even if you set it back to none via setBackgroundMaterial, it will still trigger the bug mentioned in #42393.

  7. Innei commented on Aug 23, 2024

    @Innei

    Has any solution?

  8. kingyue737 commented on Aug 23, 2024

    @kingyue737
    Author

    Has any solution?
    No

    The original bug was confirmed #41824 four months ago. I guess it's not easy to fix this.

    Then I wanted to find a workaround via setBackgroundMaterial but found this issue. Currently, disable either backgroundMaterial or maximizable

  9. electron-issue-triage commented on Nov 22, 2024

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  10. kingyue737 commented on Nov 22, 2024

    @kingyue737
    Author

    bump

  11. 2 remaining items

  12. added
    has-repro-gist
    on Dec 10, 2024
  13. Super1Windcloud commented on Dec 15, 2024

    @Super1Windcloud

    The thing is, in most of my templates, mainWindow.setBackgroundMaterial("mica") or mainWindow.setBackgroundMaterial("acrylic") doesn't work.

  14. Super1Windcloud commented on Dec 15, 2024

    @Super1Windcloud

    @codebytere , can this problem be solved?

  15. VIXI0 commented on Jan 7, 2025

    @VIXI0

    #38466 (comment)

    here is a workaround

  16. electron-issue-triage commented on Apr 8, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  17. kingyue737 commented on Apr 8, 2025

    @kingyue737
    Author

    bump

  18. electron-issue-triage commented on Jul 8, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  19. kingyue737 commented on Jul 8, 2025

    @kingyue737
    Author

    bump

  20. added
    status/confirmed
    and removed on Jul 8, 2025
  21. self-assigned this
    on Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

31-x-ybug 🪲has-repro-gistplatform/windowsstatus/confirmed

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions