VNC-181 clear canvas on disconnect
This commit is contained in:
parent
009bd4726d
commit
91771655b5
|
|
@ -663,7 +663,7 @@ export default class Display {
|
||||||
* This must be called when switching between transit modes tcp/udp
|
* This must be called when switching between transit modes tcp/udp
|
||||||
*/
|
*/
|
||||||
clear() {
|
clear() {
|
||||||
this._clearAsyncQueue();
|
this._clearAsyncQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -672,6 +672,9 @@ export default class Display {
|
||||||
dispose() {
|
dispose() {
|
||||||
clearInterval(this._frameStatsInterval);
|
clearInterval(this._frameStatsInterval);
|
||||||
this.clear();
|
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) {
|
fillRect(x, y, width, height, color, frame_id, fromQueue) {
|
||||||
|
|
|
||||||
|
|
@ -1743,12 +1743,12 @@ export default class RFB extends EventTargetMixin {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'disconnecting':
|
case 'disconnecting':
|
||||||
|
this._proxyRFBMessage('secondarydisconnected');
|
||||||
this._disconnect();
|
this._disconnect();
|
||||||
|
|
||||||
this._disconnTimer = setTimeout(() => {
|
this._disconnTimer = setTimeout(() => {
|
||||||
Log.Error("Disconnection timed out.");
|
Log.Error("Disconnection timed out.");
|
||||||
this._updateConnectionState('disconnected');
|
this._updateConnectionState('disconnected');
|
||||||
this._proxyRFBMessage('secondarydisconnected')
|
|
||||||
}, DISCONNECT_TIMEOUT * 1000);
|
}, DISCONNECT_TIMEOUT * 1000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue