Don't grab keyboard or mouse in view-only mode

Fixes #644.
This commit is contained in:
Samuel Mannehed 2016-09-01 15:03:39 +02:00
parent da346c3b21
commit 81bd2d6682
1 changed files with 5 additions and 4 deletions

View File

@ -415,8 +415,8 @@
}
if (this._display && this._display.get_context()) {
this._keyboard.ungrab();
this._mouse.ungrab();
if (!this._view_only) { this._keyboard.ungrab(); }
if (!this._view_only) { this._mouse.ungrab(); }
this._display.defaultCursor();
if (Util.get_logging() !== 'debug') {
// Show noVNC logo on load and when disconnected, unless in
@ -1028,8 +1028,9 @@
this._display.set_true_color(this._true_color);
this._display.resize(this._fb_width, this._fb_height);
this._onFBResize(this, this._fb_width, this._fb_height);
this._keyboard.grab();
this._mouse.grab();
if (!this._view_only) { this._keyboard.grab(); }
if (!this._view_only) { this._mouse.grab(); }
if (this._true_color) {
this._fb_Bpp = 4;