mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-04 02:19:55 +00:00
Merge pull request #9066 from Clem-Fern/fix#8884
This commit is contained in:
commit
34aeb797f3
@ -340,7 +340,26 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
|
|||||||
this.configure()
|
this.configure()
|
||||||
})
|
})
|
||||||
|
|
||||||
const cls: new (..._) => Frontend = {
|
// Check if the the WebGL renderer is compatible with xterm.js:
|
||||||
|
// - https://github.com/Eugeny/tabby/issues/8884
|
||||||
|
// - https://github.com/microsoft/vscode/issues/190195
|
||||||
|
// - https://github.com/xtermjs/xterm.js/issues/4665
|
||||||
|
// - https://bugs.chromium.org/p/chromium/issues/detail?id=1476475
|
||||||
|
//
|
||||||
|
// Inspired by https://github.com/microsoft/vscode/pull/191795
|
||||||
|
|
||||||
|
let enable8884Workarround = false
|
||||||
|
const checkCanvas = document.createElement('canvas')
|
||||||
|
const checkGl = checkCanvas.getContext('webgl2')
|
||||||
|
const debugInfo = checkGl?.getExtension('WEBGL_debug_renderer_info')
|
||||||
|
if (checkGl && debugInfo) {
|
||||||
|
const renderer = checkGl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL)
|
||||||
|
if (renderer.startsWith('ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero)')) {
|
||||||
|
enable8884Workarround = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const cls: new (..._) => Frontend = enable8884Workarround ? XTermFrontend : {
|
||||||
xterm: XTermFrontend,
|
xterm: XTermFrontend,
|
||||||
'xterm-webgl': XTermWebGLFrontend,
|
'xterm-webgl': XTermWebGLFrontend,
|
||||||
}[this.config.store.terminal.frontend] ?? XTermFrontend
|
}[this.config.store.terminal.frontend] ?? XTermFrontend
|
||||||
|
Loading…
x
Reference in New Issue
Block a user