Skip to content

Prevent crash propagation from DWM#11417

Merged
himgoyalmicro merged 10 commits intomainfrom
user/himgoyal/fix_DwmExtendFrameIntoClientArea
Feb 4, 2026
Merged

Prevent crash propagation from DWM#11417
himgoyalmicro merged 10 commits intomainfrom
user/himgoyal/fix_DwmExtendFrameIntoClientArea

Conversation

@himgoyalmicro
Copy link
Contributor

@himgoyalmicro himgoyalmicro commented Feb 3, 2026

Description

It’s possible for DWM to crash or exit unexpectedly, and when that happens, DwmExtendFrameIntoClientArea returns a failure.

This change adds a safety check to prevent that failure from propagating and causing a crash in WPF and reverting the app to the previous behavior.

We will only crash if we encounter Invalid Args exception.

Customer Impact

Possibly lesser crashes in fluent and might help in fluent adoption

Regression

N/A

Testing

Local Build Pass
Sample Application Testing
Tested with a runtime application

Risk

Low, things are very much in parity with previous impl.

Microsoft Reviewers: Open in CodeFlow

@himgoyalmicro himgoyalmicro requested a review from a team February 3, 2026 06:43
@dotnet-policy-service dotnet-policy-service bot added the PR metadata: Label to tag PRs, to facilitate with triage label Feb 3, 2026
harshit7962
harshit7962 previously approved these changes Feb 3, 2026
Copy link
Member

@harshit7962 harshit7962 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@himgoyalmicro himgoyalmicro merged commit f52d8e7 into main Feb 4, 2026
8 checks passed
@himgoyalmicro himgoyalmicro deleted the user/himgoyal/fix_DwmExtendFrameIntoClientArea branch February 4, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants