From 4a489f362ea656afaca1f3892a58a568f11cf94d Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 30 Jan 2012 00:53:13 -0800 Subject: [PATCH] Synchronize layers properly in copy. --- src/main/resources/layer.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/resources/layer.js b/src/main/resources/layer.js index 64ee9a7..ee986a5 100644 --- a/src/main/resources/layer.js +++ b/src/main/resources/layer.js @@ -246,8 +246,8 @@ Guacamole.Layer = function(width, height) { function scheduleTask(handler, blocked) { // If no pending tasks, just call (if available) and exit - if (layer.isReady() && !blocked && handler != null) { - handler(); + if (layer.isReady() && !blocked) { + if (handler) handler(); return null; } @@ -382,10 +382,9 @@ Guacamole.Layer = function(width, height) { * * @param {function} handler The function to call once all currently * pending operations are complete. + * @param {boolean} blocked Whether the task should start blocked. */ - this.sync = function(handler) { - return scheduleTask(handler); - }; + this.sync = scheduleTask; /** * Copy a rectangle of image data from one Layer to this Layer. This -- 1.7.10.4