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
aux window: add barrier waiting for styles to load #199882
Conversation
The debug toolbar needs to compute its size and positioning, which without this fails if executed in onDidChangeActiveContainer. The result of these changes is a new property on the ILayoutService.
7910cc7
to
684ffcb
Compare
src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/browser/layout.ts
Outdated
this._onDidAddContainer.fire({ container: window.container, disposables: eventDisposables }); | ||
|
||
disposables.add(window.onDidLayout(dimension => this.handleContainerDidLayout(window.container, dimension))); | ||
disposables.add(window.onWillClose(() => this.auxWindowStylesLoaded.delete(window.container))); |
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.
You can just add a toDisposable
here, no need to listen to the close event. The idea is that the passed disposables share the same lifecycle as the window.
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.
🆒
The debug toolbar needs to compute its size and positioning, which without this fails if executed in onDidChangeActiveContainer. The result of these changes is a new property on the ILayoutService.