[PR #12026] [MERGED] Preserve cursor visibility on resize in conhost #28816

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12026
Author: @j4james
Created: 12/23/2021
Status: ✅ Merged
Merged: 1/3/2022
Merged by: @undefined

Base: main ← Head: fix-cursor-visibility


📝 Commits (1)

  • 25f6049 Preserve cursor visibility on resize.

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 src/host/screenInfo.cpp (+3 -1)

📄 Description

Summary of the Pull Request

When a conhost window is resized, the cursor is temporarily hidden, and the visibility is restored when the resize is finished. However, it wasn't taking into account that the cursor may already have been hidden to start with, in which case it would mistakenly force the cursor to be visible. This PR now saves the initial state of the visibility, so it can be correctly restored.

PR Checklist

  • Closes Needs search (#12024)
  • CLA signed.
  • Tests added/passed
  • Documentation updated.
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

I've manually verified that this fixes the issue, and the cursor is no longer forced to be visible when the window is resized.


🔄 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/12026 **Author:** [@j4james](https://github.com/j4james) **Created:** 12/23/2021 **Status:** ✅ Merged **Merged:** 1/3/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `fix-cursor-visibility` --- ### 📝 Commits (1) - [`25f6049`](https://github.com/microsoft/terminal/commit/25f60498f4e0088252bef2ced59c2b752e932d51) Preserve cursor visibility on resize. ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/host/screenInfo.cpp` (+3 -1) </details> ### 📄 Description ## Summary of the Pull Request When a conhost window is resized, the cursor is temporarily hidden, and the visibility is restored when the resize is finished. However, it wasn't taking into account that the cursor may already have been hidden to start with, in which case it would mistakenly force the cursor to be visible. This PR now saves the initial state of the visibility, so it can be correctly restored. ## PR Checklist * [x] Closes #12024 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Validation Steps Performed I've manually verified that this fixes the issue, and the cursor is no longer forced to be visible when the window is resized. --- <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:30:57 +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#28816