[PR #12713] [MERGED] Fix engine size not being changed on DPI changes #29202

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12713
Author: @lhecker
Created: 3/17/2022
Status: ✅ Merged
Merged: 3/24/2022
Merged by: @undefined

Base: main ← Head: dev/lhecker/11317-dpi-change-fix


📝 Commits (1)

  • ee9825f Fix engine size not being changed on DPI changes

📊 Changes

2 files changed (+54 additions, -106 deletions)

View changed files

📝 src/cascadia/TerminalControl/ControlCore.cpp (+53 -103)
📝 src/cascadia/TerminalControl/ControlCore.h (+1 -3)

📄 Description

Previously we would only call SetWindowSize and TriggerRedrawAll if the
viewport size in characters changed. This commit removes the limitation.
Since the if-condition limiting full redraws is now gone, this commit
moves the responsibility of limiting the calls up the call chain.
With _refreshSizeUnderLock now being a heavier function call
than before, some surrounding code was thus refactored.

PR Checklist

Validation Steps Performed

Test relevant for #11317:

  • Print text, filling the entire window
  • Move the window from a 150% scale to a 300% scale monitor
  • The application works as expected ✅

Regression tests:

  • Text zoom with Ctrl+Plus/Minus/0 works as before ✅
  • Resizing a window works as before ✅
  • No deadlocks, etc. during settings updates ✅

🔄 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/12713 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 3/17/2022 **Status:** ✅ Merged **Merged:** 3/24/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/11317-dpi-change-fix` --- ### 📝 Commits (1) - [`ee9825f`](https://github.com/microsoft/terminal/commit/ee9825ff523bbad30816bb0dcce4a6c52f0119af) Fix engine size not being changed on DPI changes ### 📊 Changes **2 files changed** (+54 additions, -106 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+53 -103) 📝 `src/cascadia/TerminalControl/ControlCore.h` (+1 -3) </details> ### 📄 Description Previously we would only call `SetWindowSize` and `TriggerRedrawAll` if the viewport size in characters changed. This commit removes the limitation. Since the if-condition limiting full redraws is now gone, this commit moves the responsibility of limiting the calls up the call chain. With `_refreshSizeUnderLock` now being a heavier function call than before, some surrounding code was thus refactored. ## PR Checklist * [x] Closes #11317 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed Test relevant for #11317: * Print text, filling the entire window * Move the window from a 150% scale to a 300% scale monitor * The application works as expected ✅ Regression tests: * Text zoom with Ctrl+Plus/Minus/0 works as before ✅ * Resizing a window works as before ✅ * No deadlocks, etc. during settings updates ✅ --- <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:33:28 +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#29202