[PR #3460] [MERGED] Prevents DWM crashing from also crashing us #25369

Open
opened 2026-01-31 09:09:06 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3460
Author: @zadjii-msft
Created: 11/6/2019
Status: Merged
Merged: 11/6/2019
Merged by: @miniksa

Base: masterHead: dev/migrie/b/2735-dont-let-dwm-187-us


📝 Commits (1)

  • dcfb0c4 Prevents DWM crashing from also crashing us

📊 Changes

2 files changed (+9 additions, -6 deletions)

View changed files

📝 src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp (+8 -5)
📝 src/cascadia/WindowsTerminal/NonClientIslandWindow.h (+1 -1)

📄 Description

Summary of the Pull Request

It's apparently perfectly possible that DWM will just crash or close, and when it does, DwmExtendFrameIntoClientArea will return a failure. If we THROW_IF_FAILED that call, then we'll also crash when DWM does.

This converts that THROW_IF_FAILED to a LOG_IF_FAILED. When DWM comes back, we'll hit this codepath again, and all will be right again in the world.

PR Checklist

Validation Steps Performed

taskkill /f /im dwm.exe used to crash us too, now it onlt takes down DWM.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/3460 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 11/6/2019 **Status:** ✅ Merged **Merged:** 11/6/2019 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `dev/migrie/b/2735-dont-let-dwm-187-us` --- ### 📝 Commits (1) - [`dcfb0c4`](https://github.com/microsoft/terminal/commit/dcfb0c4ec88189b8c31304d6d536f8272b72e85e) Prevents DWM crashing from also crashing us ### 📊 Changes **2 files changed** (+9 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp` (+8 -5) 📝 `src/cascadia/WindowsTerminal/NonClientIslandWindow.h` (+1 -1) </details> ### 📄 Description ## Summary of the Pull Request It's apparently perfectly possible that DWM will just crash or close, and when it does, `DwmExtendFrameIntoClientArea` will return a failure. If we THROW_IF_FAILED that call, then we'll also crash when DWM does. This converts that THROW_IF_FAILED to a LOG_IF_FAILED. When DWM comes back, we'll hit this codepath again, and all will be right again in the world. ## PR Checklist * [x] Closes #2735 * [x] I work here * [n/a] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed `taskkill /f /im dwm.exe` used to crash us too, now it onlt takes down DWM. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:09:06 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25369