-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing cursor when experimental text rendering engine is enabled in HDR enabled monitor #12507
Comments
If you don't mind, could you post your config file (a minimal one that reproduces your issue is enough), as well as a screenshot of your terminal while you've got input focus? |
Interestingly if I print-screen the cursor isn't there (which is also what I see during use): and if I unfocus the window and print-screen the cursor isn't there: but if I snipping-tool the window while it is focused the cursor renders: settings.json for reference: |
I think I bisected the issue, the trigger seems to be HDR. In this video I start the bottom monitor with HDR disabled and the top monitor with HDR enabled. The cursor blinks on the non-HDR monitor and stops blinking when the window is moved to the HDR monitor. If I enable HDR on the bottom monitor the issue occurs on both monitors: Recording.mp4Snipping tool takes a non-HDR snapshot of the display buffer during the "freeze-frame" where you can select the portion of the screen to snip. Print-screen on the other hand takes an immediate HDR copy of the output buffer. This explains why the 2 modes behaved differently. Finally this occurs on a machine with an AMD GPU and a machine with an Nvidia GPU and does not change if software rendering is used. This makes me feel it's not a hardware/driver specific issue rather something with the experimental renderer and HDR directly. |
I am attaching the settings file and a screenshot of an active session. As you can see the cursor shows up in the capture, but it is not actually rendered on the screen. I am attaching the settings file. It fails both Windows Powershell and Powershell core. |
The previous implementation only inverted the RGB values of the cell, but failed to account for situations where the `color` is transparent, which is the case when `backgroundOpaqueMixin` is 0 (for instance if acrylic backgrounds are enabled). In these situations the alpha component remained 0 which caused the cursor to be invisible. For some inexplicable reason this issue is only visible on a HDR display, even though it should also effect regular ones. God knows why. With this commit the cursor texture is treated as a mask that inverts the color. We use branching here, because I couldn't come up with a more clever solution. ## PR Checklist * [x] Closes #12507 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Cursor is visible on a HDR display with acrylic background ✅ * TBD performance benchmark for `[branch]` ❌
The previous implementation only inverted the RGB values of the cell, but failed to account for situations where the `color` is transparent, which is the case when `backgroundOpaqueMixin` is 0 (for instance if acrylic backgrounds are enabled). In these situations the alpha component remained 0 which caused the cursor to be invisible. For some inexplicable reason this issue is only visible on a HDR display, even though it should also effect regular ones. God knows why. With this commit the cursor texture is treated as a mask that inverts the color. We use branching here, because I couldn't come up with a more clever solution. ## PR Checklist * [x] Closes #12507 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Cursor is visible on a HDR display with acrylic background ✅ * TBD performance benchmark for `[branch]` ❌ (cherry picked from commit 9ab4abf)
🎉This issue was addressed in #12548, which has now been successfully released as Handy links: |
Windows Terminal version
1.13.10395.0
Windows build number
10.0.22000
Other Software
Plain vanilla Powershell
Steps to reproduce
Expected Behavior
The cursor should appear and blink.
Actual Behavior
No cursor at all, not even a solid cursor shows up.
Disabling experimental rendering brings back a fully functional blinking cursor.
Moving the Terminal window to a monitor without HDR brings the cursor back.
The text was updated successfully, but these errors were encountered: