VNC-181 clear canvas on disconnect

This commit is contained in:
matt 2025-07-23 12:25:49 -04:00
parent 009bd4726d
commit 91771655b5
2 changed files with 5 additions and 2 deletions

View File

@ -672,6 +672,9 @@ export default class Display {
dispose() {
clearInterval(this._frameStatsInterval);
this.clear();
if (this._targetCtx && this._target) {
this._targetCtx.clearRect(0,0, this._target.width, this._target.height);
}
}
fillRect(x, y, width, height, color, frame_id, fromQueue) {

View File

@ -1743,12 +1743,12 @@ export default class RFB extends EventTargetMixin {
break;
case 'disconnecting':
this._proxyRFBMessage('secondarydisconnected');
this._disconnect();
this._disconnTimer = setTimeout(() => {
Log.Error("Disconnection timed out.");
this._updateConnectionState('disconnected');
this._proxyRFBMessage('secondarydisconnected')
}, DISCONNECT_TIMEOUT * 1000);
break;