Skip to content

Fix SplashScreen fade-out transparency regression after CsWin32 refactor (#11321)#11485

Open
sachPundir wants to merge 1 commit intodotnet:mainfrom
sachPundir:fix-11321-splashscreen-blendfunction-init
Open

Fix SplashScreen fade-out transparency regression after CsWin32 refactor (#11321)#11485
sachPundir wants to merge 1 commit intodotnet:mainfrom
sachPundir:fix-11321-splashscreen-blendfunction-init

Conversation

@sachPundir
Copy link

@sachPundir sachPundir commented Feb 26, 2026

Fixes #11321

Description

During the migration of SplashScreen to CsWin32 APIs, CreateWindow
initialized a local BLENDFUNCTION variable and passed it to
UpdateLayeredWindow, but never assigned it to the _blendFunction field.

As a result, _blendFunction used in Fadeout_Tick remained
default-initialized with AlphaFormat = 0. Without AC_SRC_ALPHA,
UpdateLayeredWindow ignores per-pixel alpha entirely, causing transparent
regions of the splash image to briefly render as black during fade-out.

The fix assigns directly to _blendFunction in CreateWindow so that
Fadeout_Tick inherits the correct AlphaFormat = AC_SRC_ALPHA.

Customer Impact

Applications using SplashScreen with PNG images containing transparency
will see transparent regions turn black during fade-out.

Regression

Yes. Introduced during the CsWin32 refactor of SplashScreen.

Testing

  • Reproduced using PNG with transparent regions on .NET 10 / VS Insiders.
  • Confirmed correct fade-out behavior after fix — transparent regions
    remain transparent throughout.
  • Tested both autoClose and manual Close(TimeSpan) scenarios.
  • Confirmed no regression for fully opaque images.

Risk

Low. Single-field initialization change. No logic, API, or behavioral
changes beyond correcting the regression.

Microsoft Reviewers: Open in CodeFlow

Initialize _blendFunction instead of using a local BLENDFUNCTION instance.
During fade-out, the uninitialized field caused AlphaFormat to be 0,
resulting in transparent regions rendering gray.

Fixes dotnet#11321
@sachPundir sachPundir requested a review from a team February 26, 2026 18:06
@dotnet-policy-service dotnet-policy-service bot added PR metadata: Label to tag PRs, to facilitate with triage Community Contribution A label for all community Contributions labels Feb 26, 2026
@sachPundir sachPundir changed the title Fix SplashScreen fade-out transparency regression after CsWin32 refactor Fix SplashScreen fade-out transparency regression after CsWin32 refactor (#11321) Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SplashScreen areas with transparency turn black when fading out in .NET 10

1 participant