Skip to content

[Bug]: Maximizing a frameless window with background material (Mica) permanently breaks the window #41824

Closed

Description

@mitchchn

Preflight Checklist

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.

CleanShot 2024-04-10 at 11 17 34

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.

Activity

  1. added
    has-repro-gist
    on Apr 10, 2024
  2. moved this to 👀 Unsorted Items in 30-x-yon Apr 10, 2024
  3. moved this from 👀 Unsorted Items to 🛑 Blocks Stable in 30-x-yon Apr 10, 2024
  4. self-assigned this
    on Apr 10, 2024
  5. added
    status/confirmed
    on Apr 12, 2024
  6. moved this to 👀 Unsorted Items in 29-x-yon Apr 12, 2024
  7. moved this from 🛑 Blocks Stable to 👍 Does Not Block Stable in 30-x-yon Apr 12, 2024
  8. watchingfun commented on Jun 4, 2024

    @watchingfun

    v30.0.9 same problem

  9. richhost commented on Jun 12, 2024

    @richhost

    v31.0.0 same problem

  10. alexander-499 commented on Sep 6, 2024

    @alexander-499

    v30.0.8 Same problem!

  11. reitowo commented on Nov 28, 2024

    @reitowo
    Member

    Same here

  12. eliandoran commented on Dec 9, 2024

    @eliandoran

    The problem occurs for us as well in our application (see TriliumNext/Notes#717), making it impossible to activate this feature by default. Moreover, if we have the native title bar activated, we run into a disabled maximize button (see #10414).

  13. VIXI0 commented on Jan 7, 2025

    @VIXI0

    Does Anyone has a working version ?

  14. VIXI0 commented on Jan 7, 2025

    @VIXI0

    #38466 (comment)

    here is a workaround

  15. self-assigned this
    on Feb 2, 2025
  16. codebytere commented on Feb 2, 2025

    @codebytere
    Member

    hey folks - got a lead on this and should have a mitigation PR up by the end of next week.

  17. rasterdds commented on Feb 18, 2025

    @rasterdds

    hey folks - got a lead on this and should have a mitigation PR up by the end of next week.

    That bug still occurs (on [email protected]) when maximizing the window by dragging it to the top of the screen or using the Win + ↑ shortcut. Additionally, the setFullscreen() function doesn't remove the Window corners unless it is called while the window is maximized. Please re-open this issue.

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

Metadata

Metadata

Labels

28-x-y29-x-y30-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