Skip to content

Commit c294695

Browse files
author
mgabor3141
committed
refactor: plumb core service into Viewport constructor
1 parent fe0952b commit c294695

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/browser/Viewport.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
77
import { ViewportConstants } from 'browser/shared/Constants';
88
import { Disposable, toDisposable } from 'common/Lifecycle';
9-
import { IBufferService, IMouseStateService, IOptionsService } from 'common/services/Services';
9+
import { IBufferService, ICoreService, IMouseStateService, IOptionsService } from 'common/services/Services';
1010
import { CoreMouseEventType } from 'common/Types';
1111
import { scheduleAtNextAnimationFrame } from 'browser/Dom';
1212
import { SmoothScrollableElement } from 'browser/scrollable/scrollableElement';
@@ -33,6 +33,7 @@ export class Viewport extends Disposable {
3333
screenElement: HTMLElement,
3434
@IBufferService private readonly _bufferService: IBufferService,
3535
@ICoreBrowserService coreBrowserService: ICoreBrowserService,
36+
@ICoreService private readonly _coreService: ICoreService,
3637
@IMouseStateService mouseStateService: IMouseStateService,
3738
@IThemeService themeService: IThemeService,
3839
@IOptionsService private readonly _optionsService: IOptionsService,
@@ -161,6 +162,8 @@ export class Viewport extends Disposable {
161162
if (!this._renderService || this._isSyncing) {
162163
return;
163164
}
165+
// Plumb synchronized output state into Viewport for follow-up behavior changes.
166+
void this._coreService.decPrivateModes.synchronizedOutput;
164167
this._isSyncing = true;
165168

166169
// Ignore any onScroll event that happens as a result of dimensions changing as this should

0 commit comments

Comments
 (0)