[go: nahoru, domu]

Skip to content

Commit

Permalink
Moved resizeTimout to the UI object, no reason to have it outside any…
Browse files Browse the repository at this point in the history
…more..
  • Loading branch information
samhed committed Sep 22, 2015
1 parent 40b35fa commit 045d922
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions include/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -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(' +
Expand Down

0 comments on commit 045d922

Please sign in to comment.