[PR #9792] [CLOSED] Initialize the foreground and background in TermControl's constructor #27749

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9792
Author: @PankajBhojwani
Created: 4/12/2021
Status: Closed

Base: mainHead: dev/pabhoj/control_bg_fg


📝 Commits (6)

📊 Changes

2 files changed (+42 additions, -17 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+40 -17)
📝 src/cascadia/TerminalControl/TermControl.h (+2 -0)

📄 Description

We recently moved setting the foreground and background out of
TermControl::_ApplyUISettings , but that means we no longer set the
foreground/background in the constructor, resulting in the terminal
being gray on startup until we call UpdateAppearance after the
renderer is setup. This change sets the foreground and background in the
TermControl constructor to avoid this.

Validation Steps Performed

Terminal no longer starts up gray


🔄 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/9792 **Author:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Created:** 4/12/2021 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dev/pabhoj/control_bg_fg` --- ### 📝 Commits (6) - [`67ec30d`](https://github.com/microsoft/terminal/commit/67ec30dd3d83691a5ab490e508699673a3ca3c51) foreground and background in constructor - [`dbcd933`](https://github.com/microsoft/terminal/commit/dbcd9332b1af8e0a70ab1670a1f4cd3a60135db6) no fire and forget - [`1b8e47c`](https://github.com/microsoft/terminal/commit/1b8e47c9145983c83fcb0f830db61db62b7569ac) helpers - [`fefd03d`](https://github.com/microsoft/terminal/commit/fefd03d8a3672b6f9451a462ef04cf0af386a9c8) still use weakthis - [`4d3cf3b`](https://github.com/microsoft/terminal/commit/4d3cf3b1508bf0bf7600cfb6db15bee36668abd1) conflict - [`e5519a7`](https://github.com/microsoft/terminal/commit/e5519a7342315f58be574a0fafba101819389e29) conflict ### 📊 Changes **2 files changed** (+42 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+40 -17) 📝 `src/cascadia/TerminalControl/TermControl.h` (+2 -0) </details> ### 📄 Description We recently moved setting the foreground and background out of `TermControl::_ApplyUISettings` , but that means we no longer set the foreground/background in the constructor, resulting in the terminal being gray on startup until we call `UpdateAppearance` after the renderer is setup. This change sets the foreground and background in the TermControl constructor to avoid this. ## Validation Steps Performed Terminal no longer starts up gray --- <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:24:00 +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#27749