Plagued by the throbber? #22997

Open
opened 2026-01-31 08:29:32 +00:00 by claunia · 6 comments
Owner

Originally created by @vefatica on GitHub (Mar 7, 2025).

Throbber = spinning blue annulus (no arrow)

Microsoft Windows [Version 10.0.19045.5487]
(c) Microsoft Corporation. All rights reserved.
Microsoft Windows 10 Pro for Workstations
10.0.19045.5487 (2009, 22H2)
WindowsTerminal 1.22.2502.04002 (1.22.352.0)

I'm in a situation like this. The mouse pointer is in the text area of the WT window.

Image

When I execute the command I get a new instance of WT. If I immediately "exit" the new CMD (and the new WT), not having moved the mouse, I'm back in the original WT and instead of a mouse pointer I see the throbber. The throbber remains until I move the mouse. ONLY moving the mouse will get rid of the throbber; no keystrokes, even starting other apps (Win+R), will get rid of it. Windows 10 is "throbber-happy". In scenarios not involving WT, it goes away on its own.

The throbber has plagued me ever since I started using WT. This is just one way (of many) to see it. Very occasionally, I'll see the horizontal double-headed arrow (as if resizing a window) instead.

Originally created by @vefatica on GitHub (Mar 7, 2025). Throbber = spinning blue annulus (no arrow) Microsoft Windows [Version 10.0.19045.5487] (c) Microsoft Corporation. All rights reserved. Microsoft Windows 10 Pro for Workstations 10.0.19045.5487 (2009, 22H2) WindowsTerminal 1.22.2502.04002 (1.22.352.0) I'm in a situation like this. The mouse pointer is in the text area of the WT window. ![Image](https://github.com/user-attachments/assets/bc686b2f-cd2d-4d03-bdb7-4c31d7dc57d7) When I execute the command I get a new instance of WT. If I immediately "exit" the new CMD (and the new WT), not having moved the mouse, I'm back in the original WT and instead of a mouse pointer I see the throbber. The throbber remains until I move the mouse. ONLY moving the mouse will get rid of the throbber; no keystrokes, even starting other apps (Win+R), will get rid of it. Windows 10 is "throbber-happy". In scenarios not involving WT, it goes away on its own. The throbber has plagued me ever since I started using WT. This is just one way (of many) to see it. Very occasionally, I'll see the horizontal double-headed arrow (as if resizing a window) instead.
Author
Owner

@Zeroes1 commented on GitHub (Mar 10, 2025):

@vefatica If you are interested I can give you the script for Autohotkey utility, for fix this effect (auto detect WT window foreground and mouse move 1pixel and return, for suppression effect).

ps. I see also this FAKE BUSY effect and with another windows: FireFox, SAP GUI on some scenario.

@Zeroes1 commented on GitHub (Mar 10, 2025): @vefatica If you are interested I can give you the script for Autohotkey utility, for fix this effect (auto detect WT window foreground and mouse move 1pixel and return, for suppression effect). ps. I see also this FAKE BUSY effect and with another windows: FireFox, SAP GUI on some scenario.
Author
Owner

@vefatica commented on GitHub (Mar 10, 2025):

Thanks @Zeroes1. I have already done that in a plugin for the TCC shell (which always runs in my WTs). It probably does the same thing. It uses a WinEventHook watching only for EVENT_SYSTEM_FOREGROUND and only for the CASCADIA_HOSTING_WINDOW_CLASS window my shell is in. That's good enough for me. Here's the hook process; it should be self-explanatory.

VOID CALLBACK WTForegroundHookProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, ... )
 {
	 if ( hwnd == GetCascadiaWindow() && MouseInWT() )
	 {
		 WiggleMouse();
	 }
 }

I have another hook, not implemented right now, that does the same for any/all CASCADIA_HOSTING_WINDOW_CLASS windows.

I find that one pixel is not reliable. I use 5.

It's comforting (?) to hear that someone else is annoyed by this. It shouldn't happen! I do use AHK but I prefer my own solutions (it's just more fun).

@vefatica commented on GitHub (Mar 10, 2025): Thanks @Zeroes1. I have already done that in a plugin for the TCC shell (which always runs in my WTs). It probably does the same thing. It uses a WinEventHook watching only for EVENT_SYSTEM_FOREGROUND and only for the CASCADIA_HOSTING_WINDOW_CLASS window my shell is in. That's good enough for me. Here's the hook process; it should be self-explanatory. ``` VOID CALLBACK WTForegroundHookProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, ... ) { if ( hwnd == GetCascadiaWindow() && MouseInWT() ) { WiggleMouse(); } } ``` I have another hook, not implemented right now, that does the same for any/all CASCADIA_HOSTING_WINDOW_CLASS windows. I find that one pixel is not reliable. I use 5. It's comforting (?) to hear that someone else is annoyed by this. **It shouldn't happen!** I do use AHK but I prefer my own solutions (it's just more fun).
Author
Owner

@Zeroes1 commented on GitHub (Mar 10, 2025):

@vefatica YEP it's very annoyng for me :)

anyway my script here:

DllCall("RegisterShellHookWindow", "ptr", A_ScriptHwnd)
OnMessage(DllCall("RegisterWindowMessage", "str", "SHELLHOOK"), ShellHook)
ShellHook(wParam, lParam, *) {
	if (wParam = 0x8004 || wParam = 4) { ; HSHELL_RUDEAPPACTIVATED || HSHELL_WINDOWACTIVATED
        ; In this case, lParam is the HWND of the activated window, or 0 for the taskbar/desktop.
        hwnd := lParam || WinExist("A")
Try
   {
        if WinGetClass(hwnd) == "CASCADIA_HOSTING_WINDOW_CLASS"
        {
          MouseMove 1,0,0,"R"
          MouseMove -1,0,0,"R"
          Sleep 500
          MouseMove 1,0,0,"R"
          MouseMove -1,0,0,"R"
        }

   }
  }
 }

@vefatica I feel ( MouseMove 1,0,0,"R", MouseMove -1,0,0,"R") can change to PostMessage with some WM_ ? :/

@Zeroes1 commented on GitHub (Mar 10, 2025): @vefatica YEP it's very annoyng for me :) anyway my script here: ``` DllCall("RegisterShellHookWindow", "ptr", A_ScriptHwnd) OnMessage(DllCall("RegisterWindowMessage", "str", "SHELLHOOK"), ShellHook) ShellHook(wParam, lParam, *) { if (wParam = 0x8004 || wParam = 4) { ; HSHELL_RUDEAPPACTIVATED || HSHELL_WINDOWACTIVATED ; In this case, lParam is the HWND of the activated window, or 0 for the taskbar/desktop. hwnd := lParam || WinExist("A") Try { if WinGetClass(hwnd) == "CASCADIA_HOSTING_WINDOW_CLASS" { MouseMove 1,0,0,"R" MouseMove -1,0,0,"R" Sleep 500 MouseMove 1,0,0,"R" MouseMove -1,0,0,"R" } } } } ``` @vefatica I feel ( MouseMove 1,0,0,"R", MouseMove -1,0,0,"R") can change to PostMessage with some WM_ ? :/
Author
Owner

@Zeroes1 commented on GitHub (Mar 10, 2025):

@lhecker
latest Canary terminal-1.24.672.0
i easy repro when close notepad and return to WT window Mouse cursor permanent is hide, its you fixed nearly?

@Zeroes1 commented on GitHub (Mar 10, 2025): @lhecker latest Canary terminal-1.24.672.0 i easy repro when close notepad and return to WT window Mouse cursor permanent is hide, its you fixed nearly?
Author
Owner

@Zeroes1 commented on GitHub (Mar 10, 2025):

OS: Windows 10 Pro x86_64 Kernel: WIN32_NT 10.0.19045.5487 (22H2)
latest Canary terminal-1.24.672.0

demo of troubles:
https://github.com/user-attachments/assets/9ee342a4-e025-4c8d-8931-693a511a016e

in case 2 show mouse cursor when OS is BUSY (but this is FAKE, OS not BUSY)

Image

@Zeroes1 commented on GitHub (Mar 10, 2025): OS: Windows 10 Pro x86_64 Kernel: WIN32_NT 10.0.19045.5487 (22H2) latest Canary terminal-1.24.672.0 demo of troubles: https://github.com/user-attachments/assets/9ee342a4-e025-4c8d-8931-693a511a016e in case 2 show mouse cursor when OS is BUSY (but this is FAKE, OS not BUSY) ![Image](https://github.com/user-attachments/assets/d1272356-c918-423d-94ce-bf1497663df5)
Author
Owner

@Zeroes1 commented on GitHub (Mar 11, 2025):

hide cursor it's regression after implementation PR:
https://github.com/microsoft/terminal/pull/18445
Fix cursor hiding on input

when close program with external method

in my case Notepad is closed via Autohotkey v2 script

#HotIf winActive("ahk_exe notepad.exe")
!X:: Send "!{F4}"
#HotIf

( AltX = AltF4)

situation repro 100%, i open separate ticket

but Fake Busy status it's very old problem (since i start use WT Microsoft.WindowsTerminal_1.17.11461.0_x64.zip already present)

@Zeroes1 commented on GitHub (Mar 11, 2025): hide cursor it's regression after implementation PR: https://github.com/microsoft/terminal/pull/18445 Fix cursor hiding on input when close program with external method in my case Notepad is closed via Autohotkey v2 script #HotIf winActive("ahk_exe notepad.exe") !X:: Send "!{F4}" #HotIf ( AltX = AltF4) situation repro 100%, i open separate ticket but Fake Busy status it's very old problem (since i start use WT Microsoft.WindowsTerminal_1.17.11461.0_x64.zip already present)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22997