From 76e262134e5ba795f9cc77dcfb8dad5ece99ea70 Mon Sep 17 00:00:00 2001 From: samhed Date: Thu, 29 Aug 2013 13:38:12 +0200 Subject: [PATCH] * Removed fbu-requests from the places I missed earlier. * Added a few clarifying comments. --- include/rfb.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/rfb.js b/include/rfb.js index c15bc30d..53c38796 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -595,7 +595,6 @@ mouseButton = function(x, y, down, bmask) { return; } else { viewportDragging = false; - ws.send(fbUpdateRequests()); // Force immediate redraw } } @@ -873,7 +872,7 @@ init_msg = function() { response = pixelFormat(); response = response.concat(clientEncodings()); - response = response.concat(fbUpdateRequests()); + response = response.concat(fbUpdateRequests()); // initial fbu-request timing.fbu_rt_start = (new Date()).getTime(); timing.pixels = 0; ws.send(response); @@ -907,6 +906,7 @@ normal_msg = function() { case 0: // FramebufferUpdate ret = framebufferUpdate(); // false means need more data if (ret) { + // only allow one outstanding fbu-request at a time ws.send(fbUpdateRequests()); } break; @@ -1571,8 +1571,6 @@ encHandlers.DesktopSize = function set_desktopsize() { conf.onFBResize(that, fb_width, fb_height); display.resize(fb_width, fb_height); timing.fbu_rt_start = (new Date()).getTime(); - // Send a new non-incremental request - ws.send(fbUpdateRequests()); FBU.bytes = 0; FBU.rects -= 1; @@ -1798,7 +1796,6 @@ that.sendCtrlAltDel = function() { arr = arr.concat(keyEvent(0xFFFF, 0)); // Delete arr = arr.concat(keyEvent(0xFFE9, 0)); // Alt arr = arr.concat(keyEvent(0xFFE3, 0)); // Control - arr = arr.concat(fbUpdateRequests()); ws.send(arr); }; @@ -1815,7 +1812,6 @@ that.sendKey = function(code, down) { arr = arr.concat(keyEvent(code, 1)); arr = arr.concat(keyEvent(code, 0)); } - arr = arr.concat(fbUpdateRequests()); ws.send(arr); };