diff options
author | samhed <samuel@cendio.se> | 2015-09-22 14:59:44 +0200 |
---|---|---|
committer | samhed <samuel@cendio.se> | 2015-09-22 14:59:44 +0200 |
commit | 045d922406678e0ea4167e09edabd89f25d3df0e (patch) | |
tree | 1cb9bfcd2d3f7113018d845367f21f2a68a297f1 | |
parent | 40b35fa20d459c731a5de826f4bd17634101a1db (diff) | |
download | novnc-045d922406678e0ea4167e09edabd89f25d3df0e.tar.gz |
Moved resizeTimout to the UI object, no reason to have it outside anymore..
-rw-r--r-- | include/ui.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/ui.js b/include/ui.js index b2938d4..cb5717c 100644 --- a/include/ui.js +++ b/include/ui.js @@ -15,8 +15,6 @@ var UI; (function () { "use strict"; - var resizeTimeout; - // Load supporting scripts window.onscriptsload = function () { UI.load(); }; Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js", @@ -25,9 +23,10 @@ var UI; UI = { - rfb_state : 'loaded', - settingsOpen : false, - connSettingsOpen : false, + rfb_state: 'loaded', + resizeTimeout: null, + settingsOpen: false, + connSettingsOpen: false, popupStatusTimeout: null, clipboardOpen: false, keyboardVisible: false, @@ -253,8 +252,8 @@ var UI; // When the local window has been resized, wait until the size remains // the same for 0.5 seconds before sending the request for changing // the resolution of the session - clearTimeout(resizeTimeout); - resizeTimeout = setTimeout(function(){ + clearTimeout(UI.resizeTimeout); + UI.resizeTimeout = setTimeout(function(){ display.set_maxWidth(size.w); display.set_maxHeight(size.h); Util.Debug('Attempting setDesktopSize(' + |