Skip to content

Initially hidden BrowserWindow with dark background flashes white background when shown #46602

Closed

Description

@jorodi

Preflight Checklist

Electron Version

35.1.5

What operating system(s) are you using?

macOS

Operating System Version

Sequoia 15.4

What arch are you using?

x64

Last Known Working Electron version

34.5.1

Expected Behavior

In v34.5.1, there was no noticeable flash when an initially hidden BrowserWindow with a dark background was shown on "ready-to-show".

Actual Behavior

In v35, the BrowserWindow has a noticeable background change when its shown.

Testcase Gist URL

https://gist.github.com/47b1d643cea6c37f73c98d6ce8a4f4fd

Additional Information

Activity

  1. added theissue type on Apr 10, 2025
  2. added
    has-repro-gist
    on Apr 10, 2025
  3. moved this to 👀 Unsorted Items in 35-x-yon Apr 10, 2025
  4. jorodi commented on Apr 10, 2025

    @jorodi
    Author
    electronjs-noticeable-background-load.mp4
  5. added
    bug/regression ↩️
    on Apr 10, 2025
  6. nikwen commented on Apr 10, 2025

    @nikwen
    Member

    Did this behavior change appear in v35 on Windows or Linux, too?

    I wonder if this is related to #32001 (which regressed in v35 on macOS).

  7. jorodi commented on Apr 10, 2025

    @jorodi
    Author

    I don't see it happening on Linux. I haven't checked Windows.

  8. added
    status/confirmed
    on Apr 10, 2025
  9. codebytere commented on Apr 10, 2025

    @codebytere
    Member

    Tracked to v35.0.0-alpha.2...v35.0.0-alpha.3 - i would guess 91bb748

    cc @michal-pichlinski-openfin

    Specifically - it's a result of our logic here:

    // Allow painting before shown, to be later disabled in ElectronNSWindow.
    params.headless_mode = true;

    which results in an initial white paint here:

    https://source.chromium.org/chromium/chromium/src/+/main:ui/views/cocoa/native_widget_mac_ns_window_host.mm;l=647-648;drc=0577aa4f99f2f1b2a85ac99d7b129cf87aa104bc;bpv=1;bpt=1

  10. self-assigned this
    on Apr 11, 2025
  11. moved this from 👀 Unsorted Items to 🛠️ Fixed for Next Release in 35-x-yon Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

35-x-ybug 🪲bug/regression ↩️component/BrowserWindowhas-repro-gistplatform/macOSstatus/confirmed

Type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions