microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.21k stars 8.27k forks source link

Mouse cursor hide-on-type breaks if mouse recently moved #12751

Open muchcharles opened 2 years ago

muchcharles commented 2 years ago

Windows Terminal version

1.13.10395.0

Windows build number

Version 10.0.19043.1586

Other Software

No response

Steps to reproduce

When typing in windows terminal the mouse cursor hides. However if you move the mouse cursor and then type without waiting long enough, even if you don't move the mouse cursor at all any more, the mouse cursor instead hides, and then after a couple of seconds unhides itself.

Expected behavior:

Expected Behavior

Mouse cursor hides and stays hidden when you type.

Or (unlikely) if an earlier recent move is intended to prevent hiding, then just prevent hiding rather than hide/unhiding.

Actual Behavior

If you type after a recent mouse move, the cursor hides itself and then after a delay unhides itself, even if there was no mouse movement after the hide.

If you type after a less recent mouse move (the threshold seems to be > 1-2 seconds), things work correctly: the cursor hides and stays hidden.

zadjii-msft commented 2 years ago

Hey, sorry this never got triaged - bot must have been taking a nap.

I'm totally seeing this too, however, maybe a little different. Like, if I move the mouse a bit, then type for a while, there's a timeout where eventually, the mouse does pop back into existence. But if I continue typing at that point, it blinks right back out. Weird. I wonder which of the calls to _RestorePointerCursorHandlers in TermControl is the one that ends up bringing this back? I'd probably start debugging there.