xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
17.66k stars 1.63k forks source link

Make xterm.js multi-window aware #4846

Closed Tyriar closed 1 year ago

Tyriar commented 1 year ago

The main issue this aims to solve is that xterm.js doesn't know when the window of Terminal.element changes and as such does not react to it. The main problem this causes is devicePixelRatio doesn't update when switching between monitors with different OS scaling, but there may be other problems with using "stale" windows as well. Note that this is only an issue if moving an xterm.js instance that was already opened into a new window, not if a new instance was created in a sub-window like how the client.ts button works.

See https://github.com/microsoft/vscode/issues/195577