Fix rfb._cleanup() (#743)

We don't have to check for _display or context here since this is a
private function which is never called under such circumstances. This
solves problems caused by display.get_context() which was previously
removed in e549ae074f.
This commit is contained in:
Samuel Mannehed 2017-01-09 12:49:10 +01:00 committed by GitHub
parent 16ed7b8b43
commit 3e08594c89
1 changed files with 7 additions and 9 deletions

View File

@ -444,15 +444,13 @@
}, },
_cleanup: function () { _cleanup: function () {
if (this._display && this._display.get_context()) { if (!this._view_only) { this._keyboard.ungrab(); }
if (!this._view_only) { this._keyboard.ungrab(); } if (!this._view_only) { this._mouse.ungrab(); }
if (!this._view_only) { this._mouse.ungrab(); } this._display.defaultCursor();
this._display.defaultCursor(); if (Util.get_logging() !== 'debug') {
if (Util.get_logging() !== 'debug') { // Show noVNC logo on load and when disconnected, unless in
// Show noVNC logo on load and when disconnected, unless in // debug mode
// debug mode this._display.clear();
this._display.clear();
}
} }
}, },