unfocusedAppearance cursorShape doesn't work #13956

Open
opened 2026-01-31 03:57:01 +00:00 by claunia · 7 comments
Owner

Originally created by @joca-bt on GitHub (May 26, 2021).

Originally assigned to: @PankajBhojwani on GitHub.

Windows Terminal version (or Windows build number)

1.8.1444.0

Other Software

No response

Steps to reproduce

settings.json:

{
    ...
    "profiles":
    {
        "defaults":
        {
            ...
            "cursorShape": "filledBox",
            "unfocusedAppearance": {
                "cursorShape": "emptyBox"
            }
        },
        ...
    },
    ...
}

Open Windows Terminal and some other application (e.g. Explorer) and move to that application so that Windows Terminal is unfocused.

Expected Behavior

Cursor changes to empty box.

Actual Behavior

Cursor disappears which makes the setting useless.

Originally created by @joca-bt on GitHub (May 26, 2021). Originally assigned to: @PankajBhojwani on GitHub. ### Windows Terminal version (or Windows build number) 1.8.1444.0 ### Other Software _No response_ ### Steps to reproduce `settings.json`: ``` { ... "profiles": { "defaults": { ... "cursorShape": "filledBox", "unfocusedAppearance": { "cursorShape": "emptyBox" } }, ... }, ... } ``` Open Windows Terminal and some other application (e.g. Explorer) and move to that application so that Windows Terminal is unfocused. ### Expected Behavior Cursor changes to empty box. ### Actual Behavior Cursor disappears which makes the setting useless.
Author
Owner

@zadjii-msft commented on GitHub (May 27, 2021):

Oh huh. Good point. I wonder what the best way of handling this is. Presumably, if someone has a cursorShape in unfocusedAppearance, then they want the cursor to be visible when the control is unfocused. But I wonder how hard it would be for the Terminal to actually determine we're in that case - IIRC, if there's not a cursorShape in unfocusedAppearance, then we'll silently fall back to the cursor shape in the normal Appearance object.

@zadjii-msft commented on GitHub (May 27, 2021): Oh huh. Good point. I wonder what the best way of handling this is. Presumably, if someone has a `cursorShape` in `unfocusedAppearance`, then they want the cursor to be visible when the control is unfocused. But I wonder how hard it would be for the Terminal to actually determine we're in that case - IIRC, if there's not a `cursorShape` in `unfocusedAppearance`, then we'll silently fall back to the cursor shape in the normal `Appearance` object.
Author
Owner

@DHowett commented on GitHub (May 27, 2021):

I guess we could use the HasCursorShape "inheritance" method!

@DHowett commented on GitHub (May 27, 2021): I guess we could use the `HasCursorShape` "inheritance" method!
Author
Owner

@zadjii-msft commented on GitHub (May 27, 2021):

But a TermControl only has an IControlAppearance, which doesn't have that method! And I don't feel like bringing Terminal.Settings.Model beneath Terminal.Control

@zadjii-msft commented on GitHub (May 27, 2021): But a `TermControl` only has an `IControlAppearance`, which _doesn't_ have that method! And I don't feel like bringing `Terminal.Settings.Model` beneath `Terminal.Control`
Author
Owner

@sdsalyer commented on GitHub (Sep 15, 2021):

I was surprised this didn't work since it was called out in the release notes for 1.8.1444.0:

A profile can now specify how it will appear when it's not focused via the unfocusedAppearance settings.json key (#8392)

Supported settings: foreground, background, selectionBackground, cursorColor, cursorShape, cursorHeight, backgroundImage, colorScheme, backgroundImageOpacity, backgroundImageStretchMode, backgroundImageAlignment, experimental.retroTerminalEffect, and experimental.pixelShaderPath

I would also point out it seems to work in VS Code, though I haven't changed any settings there other than the theme:
image

@sdsalyer commented on GitHub (Sep 15, 2021): I was surprised this didn't work since it was called out in the release notes for 1.8.1444.0: > A profile can now specify how it will appear when it's not focused via the unfocusedAppearance settings.json key (#8392) > > Supported settings: foreground, background, selectionBackground, cursorColor, **cursorShape**, cursorHeight, backgroundImage, colorScheme, backgroundImageOpacity, backgroundImageStretchMode, backgroundImageAlignment, experimental.retroTerminalEffect, and experimental.pixelShaderPath I would also point out it seems to work in VS Code, though I haven't changed any settings there other than the theme: ![image](https://user-images.githubusercontent.com/596870/133459677-48fb0589-dff5-443c-ad2a-71c842368de3.png)
Author
Owner

@pwsandoval commented on GitHub (May 12, 2023):

The first comment keeps happening to me, is there a way to fix it?

@pwsandoval commented on GitHub (May 12, 2023): The first comment keeps happening to me, is there a way to fix it?
Author
Owner

@mightycoco commented on GitHub (Nov 14, 2023):

I was looking for this, as well. 1.18.2822.0

@mightycoco commented on GitHub (Nov 14, 2023): I was looking for this, as well. 1.18.2822.0
Author
Owner

@AmerM137 commented on GitHub (Dec 31, 2024):

Same problem here, version 1.21.3231.0.

@AmerM137 commented on GitHub (Dec 31, 2024): Same problem here, version 1.21.3231.0.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13956