Skip to content

Commit

Permalink
SourceGenerator window now longer steals focus
Browse files Browse the repository at this point in the history
It would steal focus every time you build, which was super annoying.
  • Loading branch information
ByronMayne committed Nov 10, 2023
1 parent f1dcb54 commit 80cfd70
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ internal VisualStudioLogEventSink(
break;
}
}
// Store the currently active window, because adding a new one always draws focus, we don't want that
OutputWindowPane currentActive = s_outputWindow.ActivePane;
m_outputPane ??= s_outputWindow.OutputWindowPanes.Add(outputPanelName);
currentActive.Activate(); // Set previous one to active
m_outputInitialized = m_outputPane != null;
}
}
Expand Down

0 comments on commit 80cfd70

Please sign in to comment.