From 20c1d563fc5ad3f742f39eddad1be53d835bb12f Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 25 May 2023 15:25:10 -0500 Subject: [PATCH] Fix `focusFollowMouse` (#15420) Because this looks like it's entirely broken in `main`, and possibly in 1.17(?) We didn't take a strong ref to the coroutine parameter. As to be expected, that explodes. Closes #15412 (cherry picked from commit 6775300f42754268c83582b84593f05ee121e632) Service-Card-Id: 89311372 Service-Version: 1.17 --- src/cascadia/TerminalApp/TerminalTab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/TerminalTab.cpp b/src/cascadia/TerminalApp/TerminalTab.cpp index 27854d24210..17443ca9ea4 100644 --- a/src/cascadia/TerminalApp/TerminalTab.cpp +++ b/src/cascadia/TerminalApp/TerminalTab.cpp @@ -946,7 +946,7 @@ namespace winrt::TerminalApp::implementation } }); - events.focusToken = control.FocusFollowMouseRequested([dispatcher, weakThis](auto&& sender, auto&&) -> winrt::fire_and_forget { + events.focusToken = control.FocusFollowMouseRequested([dispatcher, weakThis](auto sender, auto) -> winrt::fire_and_forget { co_await wil::resume_foreground(dispatcher); if (const auto tab{ weakThis.get() }) {