From ee7fe256388d4dd083ac4f825e5fa3fe6fe509b5 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:07:33 -0700 Subject: [PATCH] Remove hack for canvas to force a refresh I can no longer reproduce this issue and it was a big hack regardless. Will track issues for any mentioned of bad resizes on the canvas renderer. --- .../contrib/terminal/browser/terminalInstance.ts | 4 ---- .../contrib/terminal/browser/xterm-private.d.ts | 1 - .../contrib/terminal/browser/xterm/xtermTerminal.ts | 13 ------------- 3 files changed, 18 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 4f8a9666bad..9b8ab36873d 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -1859,10 +1859,6 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { this.xterm.raw.resize(cols, rows); TerminalInstance._lastKnownGridDimensions = { cols, rows }; - - if (this._isVisible) { - this.xterm.forceUnpause(); - } } if (immediate) { diff --git a/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts b/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts index def513b7343..f4e1a0b0bbb 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts @@ -31,6 +31,5 @@ export interface IXtermCore { _renderLayers?: any[]; } }; - _handleIntersectionChange: any; }; } diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts index 47fce3bee4d..663a7fb8b62 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts @@ -446,19 +446,6 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach this._core.viewport?._innerRefresh(); } - forceUnpause() { - // HACK: Force the renderer to unpause by simulating an IntersectionObserver event. - // This is to fix an issue where dragging the windpow to the top of the screen to - // maximize on Windows/Linux would fire an event saying that the terminal was not - // visible. - if (!!this._canvasAddon) { - this._core._renderService?._handleIntersectionChange({ intersectionRatio: 1 }); - // HACK: Force a refresh of the screen to ensure links are refresh corrected. - // This can probably be removed when the above hack is fixed in Chromium. - this.raw.refresh(0, this.raw.rows - 1); - } - } - async findNext(term: string, searchOptions: ISearchOptions): Promise { this._updateFindColors(searchOptions); return (await this._getSearchAddon()).findNext(term, searchOptions);