Mouse pointer "vanishes" when moved over Terminal Window #22670

Closed
opened 2026-01-31 08:20:07 +00:00 by claunia · 22 comments
Owner

Originally created by @inoperable on GitHub (Dec 17, 2024).

Originally assigned to: @lhecker on GitHub.

          📝where'd this go

Originally posted by @zadjii-msft in https://github.com/microsoft/terminal/pull/18215#discussion_r1880139859

Probably this

Originally created by @inoperable on GitHub (Dec 17, 2024). Originally assigned to: @lhecker on GitHub. 📝where'd this go _Originally posted by @zadjii-msft in https://github.com/microsoft/terminal/pull/18215#discussion_r1880139859_ Probably this
Author
Owner

@zadjii-msft commented on GitHub (Dec 17, 2024):

@inoperable Could you add any more details/? That PR merged literally 5 days ago, I'm not sure it's even in a canary build currently

@zadjii-msft commented on GitHub (Dec 17, 2024): @inoperable Could you add any more details/? That PR merged literally 5 days ago, I'm not sure it's even in a canary build currently
Author
Owner

@inoperable commented on GitHub (Dec 17, 2024):

At some point the mouse pointer vanishes permanently after alt tab, I'm not sure what triggers it though. When restarting the terminal it seems fine for a while and then it start again.

It's weird, I thought it's because software rendering first, but nope,also toggled some other settings but I can't figure out when exactly it decides I don't need a mouse pointer shown at all.

Will update if I can pinpoint it more

Drives me nuts

@inoperable commented on GitHub (Dec 17, 2024): At some point the mouse pointer vanishes permanently after alt tab, I'm not sure what triggers it though. When restarting the terminal it seems fine for a while and then it start again. It's weird, I thought it's because software rendering first, but nope,also toggled some other settings but I can't figure out when exactly it decides I don't need a mouse pointer shown at all. Will update if I can pinpoint it more Drives me nuts
Author
Owner

@inoperable commented on GitHub (Dec 17, 2024):

It trigger must be in some onmouseover event handling on terminal window, not over the tab strip or borders (if that's of sny help). I'll get back to once I got more

@inoperable commented on GitHub (Dec 17, 2024): It trigger must be in some onmouseover event handling on terminal window, not over the tab strip or borders (if that's of sny help). I'll get back to once I got more
Author
Owner

@zadjii-msft commented on GitHub (Dec 17, 2024):

This is behavior that's on-by-default for most text fields in Windows. When you start typing in a text input, the cursor vanishes.

Can you check if this setting is on: (just searching for "Pointer" should get you there)
Image

Image

@zadjii-msft commented on GitHub (Dec 17, 2024): This is behavior that's on-by-default for most text fields in Windows. When you start typing in a text input, the cursor vanishes. Can you check if this setting is on: (just searching for "Pointer" should get you there) ![Image](https://github.com/user-attachments/assets/da3b4d85-4b15-4e61-8920-98367e1eef25) ![Image](https://github.com/user-attachments/assets/32714634-1ccf-4ef2-9585-8d617582ba9f)
Author
Owner

@lhecker commented on GitHub (Dec 17, 2024):

Oh, and please confirm with us what exact version(-number) of Windows Terminal you're using. 🙂

@lhecker commented on GitHub (Dec 17, 2024): Oh, and please confirm with us what exact version(-number) of Windows Terminal you're using. 🙂
Author
Owner

@inoperable commented on GitHub (Dec 17, 2024):

It's not the behavior intended, I'm very sure about it, the is setting OS mouse settings is a good point to eliminate culprits - but it's not it.
What happens is that the pointer gets hidden all the time once the terminal window is in focus and the mouse pointer hovers over it. I can see settings buttons highlighting (as per on mouse over event) but no mouse pointer.

Term is 1.23.241213001-llm, OS 27764.1000 & 19045.4651

@inoperable commented on GitHub (Dec 17, 2024): It's not the behavior intended, I'm very sure about it, the is setting OS mouse settings is a good point to eliminate culprits - but it's not it. What happens is that the pointer gets hidden all the time once the terminal window is in focus and the mouse pointer hovers over it. I can see settings buttons highlighting (as per on mouse over event) but no mouse pointer. Term is 1.23.241213001-llm, OS 27764.1000 & 19045.4651
Author
Owner

@inoperable commented on GitHub (Dec 17, 2024):

And this seems to be only a 27xxx insiders build exklusive, since I can't replicate it with 19045.xxxx

o.O - so I guess I just wasted your time unnecessary...

@inoperable commented on GitHub (Dec 17, 2024): And this seems to be only a 27xxx insiders build exklusive, since I can't replicate it with 19045.xxxx o.O - so I guess I just wasted your time unnecessary...
Author
Owner

@inoperable commented on GitHub (Dec 17, 2024):

It's definitely a insiders build exclusive, I couldn't replicate the same on 19045.4651. I apologize for confusions therefore, maybe this is not entirely a waste of time since this might make a come back agai, I'll fiddle around with the insiders build again and will update this thread once I know more when/how

@inoperable commented on GitHub (Dec 17, 2024): It's definitely a insiders build exclusive, I couldn't replicate the same on 19045.4651. I apologize for confusions therefore, maybe this is not entirely a waste of time since this might make a come back agai, I'll fiddle around with the insiders build again and will update this thread once I know more when/how
Author
Owner

@lhecker commented on GitHub (Dec 17, 2024):

It's possible that this is a bug across any Windows 11 version, because I did struggle quite a bit with making cursor hiding work right. The problem is that the WinUI APIs for doing so are just kind of bad and not very robust. It would not surprise me if they broke between Windows versions.

@lhecker commented on GitHub (Dec 17, 2024): It's possible that this is a bug across any Windows 11 version, because I did struggle quite a bit with making cursor hiding work right. The problem is that the WinUI APIs for doing so are just kind of bad and not very robust. It would not surprise me if they broke between Windows versions.
Author
Owner

@lhecker commented on GitHub (Dec 18, 2024):

Leading theory: The current cursor that we get from the WinUI API is non-null but also hidden. This means that when we restore it, we restore a hidden cursor that won't ever go away, because nothing explicitly sets a visible cursor in our code either. Ideally, WinUI would have a cursor stack that you can push/pop into, but in the absence of that we'll just do the next best thing:

@lhecker commented on GitHub (Dec 18, 2024): Leading theory: The current cursor that we get from the WinUI API is non-null _but also_ hidden. This means that when we restore it, we restore a hidden cursor that won't ever go away, because nothing explicitly sets a visible cursor in our code either. Ideally, WinUI would have a cursor stack that you can push/pop into, but in the absence of that we'll just do the next best thing: * Remove this code: https://github.com/microsoft/terminal/blob/8598ed78d58cf6b10372fca4132bfa9553ac6735/src/cascadia/TerminalControl/TermControl.cpp#L99-L103 * Explicitly restore a visible cursor here: https://github.com/microsoft/terminal/blob/8598ed78d58cf6b10372fca4132bfa9553ac6735/src/cascadia/TerminalControl/TermControl.cpp#L79-L80
Author
Owner

@inoperable commented on GitHub (Dec 18, 2024):

Hello Again, it actually happens again on Win10 and Win11, I caught the bug after a while in Win10 as well. I cant figure out though when/how its triggered.

Image
No mouse pointer, but the mouse hovers over the button and it reacts with highlighting

Image
Here the same thing, this happens in settiings and in terminal window

@inoperable commented on GitHub (Dec 18, 2024): Hello Again, it actually happens again on Win10 and Win11, I caught the bug after a while in Win10 as well. I cant figure out though when/how its triggered. ![Image](https://github.com/user-attachments/assets/46cbb406-3c13-4bdb-b443-b639867ca1bf) No mouse pointer, but the mouse hovers over the button and it reacts with highlighting ![Image](https://github.com/user-attachments/assets/51693d28-bba7-4ffd-835f-6ef46a2d31b3) Here the same thing, this happens in settiings and in terminal window
Author
Owner

@inoperable commented on GitHub (Dec 18, 2024):

Image
Invisible Mouse™

@inoperable commented on GitHub (Dec 18, 2024): ![Image](https://github.com/user-attachments/assets/7d2be51b-4079-42ac-a74c-e4051b372cdb) Invisible Mouse™
Author
Owner

@inoperable commented on GitHub (Dec 18, 2024):

So, to clarify @lhecker I think you are right, and have it figured out (as mentioned above)

@inoperable commented on GitHub (Dec 18, 2024): So, to clarify @lhecker I think you are right, and have it figured out (as mentioned above)
Author
Owner

@Zeroes1 commented on GitHub (Dec 19, 2024):

@lhecker , @zadjii-msft

I have another problem (but with cursor of mouse too)

i see this since begin use Windows Terminal terminal-1.17.11461.0 to latest canary release

i see this effect only when use WinSSHTerm + Putty
[https://winsshterm.blogspot.com, https://www.putty.org]

when Alt-Tab from window (WinSSHTerm + Putty) to Windows Terminal window, the mouse cursor set to OS BUSY mode.

No effect when returning from other program. No effect when returning to another window (not WT window).

problem reproduction 100%
open NEW issue for this?
https://github.com/user-attachments/assets/b0170e74-ba67-4323-9244-b766cb9bbe71

@Zeroes1 commented on GitHub (Dec 19, 2024): @lhecker , @zadjii-msft I have another problem (but with cursor of mouse too) i see this since begin use Windows Terminal terminal-1.17.11461.0 to latest canary release i see this effect only when use WinSSHTerm + Putty [https://winsshterm.blogspot.com, https://www.putty.org] when Alt-Tab from window (WinSSHTerm + Putty) to Windows Terminal window, the mouse cursor set to OS BUSY mode. No effect when returning from other program. No effect when returning to another window (not WT window). problem reproduction 100% open NEW issue for this? https://github.com/user-attachments/assets/b0170e74-ba67-4323-9244-b766cb9bbe71
Author
Owner

@lhecker commented on GitHub (Dec 19, 2024):

Yes, I think that's a separate issue.

@lhecker commented on GitHub (Dec 19, 2024): Yes, I think that's a separate issue.
Author
Owner

@inoperable commented on GitHub (Jan 9, 2025):

@lhecker PointerCursor() or it didnt happend ;-)

@inoperable commented on GitHub (Jan 9, 2025): @lhecker PointerCursor() or it didnt happend ;-)
Author
Owner

@lhecker commented on GitHub (Jan 9, 2025):

Yeah, I've since reopened https://github.com/microsoft/terminal/issues/18400. The WinRT/WinUI APIs I tried to use for this are simply too busted. I'll try it with basic Win32 code next.

@lhecker commented on GitHub (Jan 9, 2025): Yeah, I've since reopened https://github.com/microsoft/terminal/issues/18400. The WinRT/WinUI APIs I tried to use for this are simply too busted. I'll try it with basic Win32 code next.
Author
Owner

@inoperable commented on GitHub (Jan 9, 2025):

No worries, on the plus side, it makes my mouse battery last longer and invent keybindings to everything ;>

@inoperable commented on GitHub (Jan 9, 2025): No worries, on the plus side, it makes my mouse battery last longer and invent keybindings to everything ;>
Author
Owner

@inoperable commented on GitHub (Jan 9, 2025):

@lhecker have you been able to pinpoint the trigger? I still cant figure out WHAT exactly is causing it. I thought that selection+focus loss the culprit -but nope

@inoperable commented on GitHub (Jan 9, 2025): @lhecker have you been able to pinpoint the trigger? I still cant figure out WHAT exactly is causing it. I thought that selection+focus loss the culprit -but nope
Author
Owner

@lhecker commented on GitHub (Jan 9, 2025):

As far as I understand it, it's a race condition between our code and WinUI's input stack (running on another thread), which is why it happens never on some setups and quite often on others.

@lhecker commented on GitHub (Jan 9, 2025): As far as I understand it, it's a race condition between our code and WinUI's input stack (running on another thread), which is why it happens never on some setups and quite often on others.
Author
Owner

@Zeroes1 commented on GitHub (Nov 3, 2025):

my post upper, about mouse busy pointer it's bug in WinSSHTerm. Fixed in v2.41.3

@Zeroes1 commented on GitHub (Nov 3, 2025): my post upper, about mouse busy pointer it's bug in WinSSHTerm. Fixed in v2.41.3
Author
Owner

@inoperable commented on GitHub (Nov 4, 2025):

my post upper, about mouse busy pointer it's bug in WinSSHTerm. Fixed in v2.41.3

how come WinSSHTerm affects not-so-ssh-at-all runtime? As you can see in my screenshots- there is no ssh instance running there

@inoperable commented on GitHub (Nov 4, 2025): > my post upper, about mouse busy pointer it's bug in WinSSHTerm. Fixed in v2.41.3 how come WinSSHTerm affects not-so-ssh-at-all runtime? As you can see in my screenshots- there is no ssh instance running there
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22670