Don't abuse state change function for messages

This doesn't even work anymore since we fixed it to ignore changes
to the current state. Add a separate callback for notifications
instead.
This commit is contained in:
Samuel Mannehed
2016-08-29 14:59:28 +02:00
parent 4cfd49c8c3
commit a7127fee73
4 changed files with 69 additions and 6 deletions

View File

@@ -338,6 +338,7 @@ var UI;
initRFB: function() {
try {
UI.rfb = new RFB({'target': document.getElementById('noVNC_canvas'),
'onNotification': UI.notification,
'onUpdateState': UI.updateState,
'onPasswordRequired': UI.passwordRequired,
'onXvpInit': UI.updateXvpButton,
@@ -486,6 +487,10 @@ var UI;
document.getElementById('noVNC_status').classList.remove("noVNC_open");
},
notification: function (rfb, msg, level, options) {
UI.showStatus(msg, level);
},
activateControlbar: function(event) {
clearTimeout(UI.idleControlbarTimeout);
// We manipulate the anchor instead of the actual control