View-only mode doesn't need keyboard or mouse
Grabbing the keyboard and mouse is unnecessary in view_only mode. In fact its unnecessary to create the objects at all. Fixes #644.
This commit is contained in:
parent
f4f4e8993d
commit
0ccf432f12
|
|
@ -184,6 +184,7 @@ var RFB;
|
||||||
throw exc;
|
throw exc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this._view_only) {
|
||||||
this._keyboard = new Keyboard({target: this._focusContainer,
|
this._keyboard = new Keyboard({target: this._focusContainer,
|
||||||
onKeyPress: this._handleKeyPress.bind(this)});
|
onKeyPress: this._handleKeyPress.bind(this)});
|
||||||
|
|
||||||
|
|
@ -191,6 +192,7 @@ var RFB;
|
||||||
onMouseButton: this._handleMouseButton.bind(this),
|
onMouseButton: this._handleMouseButton.bind(this),
|
||||||
onMouseMove: this._handleMouseMove.bind(this),
|
onMouseMove: this._handleMouseMove.bind(this),
|
||||||
notify: this._keyboard.sync.bind(this._keyboard)});
|
notify: this._keyboard.sync.bind(this._keyboard)});
|
||||||
|
}
|
||||||
|
|
||||||
this._sock = new Websock();
|
this._sock = new Websock();
|
||||||
this._sock.on('message', this._handle_message.bind(this));
|
this._sock.on('message', this._handle_message.bind(this));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue