-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix persistence of handoff'd tabs #17268
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lhecker
commented
May 14, 2024
@@ -180,12 +180,14 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation | |||
const HANDLE hRef, | |||
const HANDLE hServerProcess, | |||
const HANDLE hClientProcess, | |||
TERMINAL_STARTUP_INFO startupInfo) : | |||
const TERMINAL_STARTUP_INFO& startupInfo) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This is just a lil extra. Avoids a struct copy.)
lhecker
added a commit
that referenced
this pull request
May 14, 2024
DHowett
approved these changes
May 14, 2024
PankajBhojwani
approved these changes
May 15, 2024
carlos-zamora
approved these changes
May 15, 2024
DHowett
pushed a commit
that referenced
this pull request
May 17, 2024
As it turns out, for handoff'd connections `Initialize` isn't called and this meant the `_sessionId` was always null. After this PR we still don't have a `_profileGuid` but that's probably not a critical issue, since that's an inherent flaw with handoff. It can only be solved in a robust manner if WT gets launched before the console app is launched, but it's unlikely for that to ever happen. ## Validation Steps Performed * Launch * Register that version of WT as the default * Close all tabs (Ctrl+Shift+W) * `persistedWindowLayouts` is empty ✅ * Launch cmd/pwsh via handoff * You get 1 window ✅ * Close the window (= press the X button) * Launch * You get 2 windows ✅ (cherry picked from commit 9054c81) Service-Card-Id: 92556178 Service-Version: 1.21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As it turns out, for handoff'd connections
Initialize
isn't calledand this meant the
_sessionId
was always null.After this PR we still don't have a
_profileGuid
but that's probablynot a critical issue, since that's an inherent flaw with handoff.
It can only be solved in a robust manner if WT gets launched before the
console app is launched, but it's unlikely for that to ever happen.
Validation Steps Performed
persistedWindowLayouts
is empty ✅