Skip to content

Commit 900e82a

Browse files
committed
Post WM_SETCURSOR after WM_ACTIVATE to workaround XAML island busy cursor
1 parent 694db4c commit 900e82a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/cascadia/WindowsTerminal/IslandWindow.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,16 @@ void IslandWindow::_OnGetMinMaxInfo(const WPARAM /*wParam*/, const LPARAM lParam
518518
const bool activated = LOWORD(wparam) != 0;
519519
WindowActivated.raise(activated);
520520

521+
// GH#18662: After raising WindowActivated, XAML may be busy processing
522+
// the activation (focus, layout, rendering). During this time, WM_SETCURSOR
523+
// may go unanswered, causing Windows to show a busy cursor (IDC_APPSTARTING)
524+
// until the next mouse move. Post a WM_SETCURSOR to force re-evaluation
525+
// once XAML is idle.
526+
if (activated)
527+
{
528+
PostMessageW(GetHandle(), WM_SETCURSOR, 0, MAKELPARAM(HTCLIENT, WM_MOUSEMOVE));
529+
}
530+
521531
if (_autoHideWindow && !activated)
522532
{
523533
if (_isQuakeWindow || _minimizeToNotificationArea)

0 commit comments

Comments
 (0)