Skip to content

Use the I-beam pointer over the text area - #20645

Open
Nikolay Shopik (nshopik) wants to merge 1 commit into
microsoft:mainfrom
nshopik:ibeam-pointer
Open

Use the I-beam pointer over the text area#20645
Nikolay Shopik (nshopik) wants to merge 1 commit into
microsoft:mainfrom
nshopik:ibeam-pointer

Conversation

@nshopik

Copy link
Copy Markdown

Windows Terminal shows the arrow pointer over selectable text, which the Windows human interface guidelines treat as wrong and which no other mainstream terminal does. Closes #1441.

WinUI 2 has no per-element cursor - UIElement.ProtectedCursor is WinUI 3 only - so the shape is derived on every pointer move and set on the CoreWindow, the same cursor XAML itself applies. Setting it with Win32 SetCursor flickers instead, because it loses to the WM_SETCURSOR the XAML input site handles while the move is dispatched.

No setting turns this off. The global opt-out asked for in #5028 can follow in a separate change if it is still wanted.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Product-Terminal The new Windows Terminal. labels Sep 4, 2026
@nshopik

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Comment thread src/cascadia/TerminalControl/TermControl.cpp Fixed
Comment thread src/cascadia/TerminalControl/TermControl.cpp Fixed
Comment thread src/cascadia/TerminalControl/TermControl.cpp Fixed
Comment thread src/cascadia/TerminalControl/TermControl.cpp Fixed
Comment thread src/cascadia/TerminalControl/TermControl.h Fixed
@github-actions

This comment has been minimized.

WinUI 2 has no per-element cursor - UIElement.ProtectedCursor is WinUI 3
only - so the shape gets set on the CoreWindow and derived on every
pointer move. Win32 SetCursor loses the race against the WM_SETCURSOR the
XAML input site handles while the move is dispatched, and the arrow shows
through as a flicker.

Closes microsoft#1441

@lhecker Leonard Hecker (lhecker) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not necessary to do this on focus too? Tabbing back into the app should update the cursor even if I don't move the cursor and this doesn't handle it right?

@nshopik

Copy link
Copy Markdown
Author

I've manually tested alt-tabing when not moving cursor it update it correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mouse pointer should be text and not arrow one

3 participants