This fixes Out-GridView

This is a hack, but an amazing proof of concept
This commit is contained in:
Mike Griese
2022-03-28 16:28:33 -05:00
parent 5b618711eb
commit 5923cf3261

View File

@@ -456,7 +456,10 @@ PCONSOLE_API_MSG IoDispatchers::ConsoleHandleConnectionRequest(_In_ PCONSOLE_API
return pReceiveMsg;
}
gci.ProcessHandleList.ModifyConsoleProcessFocus(WI_IsFlagSet(gci.Flags, CONSOLE_HAS_FOCUS));
const bool inConpty{ gci.IsInVtIoMode() };
const bool hasFocus{ WI_IsFlagSet(gci.Flags, CONSOLE_HAS_FOCUS) };
const auto grantFG{ inConpty || hasFocus };
gci.ProcessHandleList.ModifyConsoleProcessFocus(grantFG);
// Create the handles.