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.
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 isdevicePixelRatio
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