mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Merge branch 'unstable' of ssh://guacamole.git.sourceforge.net/gitroot/guacamole/guacamole-common-js into unstable
This commit is contained in:
@@ -151,13 +151,21 @@ function Layer(width, height) {
|
|||||||
display.copyRect = function(srcLayer, srcx, srcy, w, h, x, y) {
|
display.copyRect = function(srcLayer, srcx, srcy, w, h, x, y) {
|
||||||
var updateId = currentUpdate++;
|
var updateId = currentUpdate++;
|
||||||
|
|
||||||
// Synchronize copy operation with source layer
|
function scheduleCopyRect() {
|
||||||
srcLayer.sync(function() {
|
|
||||||
setUpdate(updateId, function() {
|
setUpdate(updateId, function() {
|
||||||
if (autosize != 0) fitRect(x, y, w, h);
|
if (autosize != 0) fitRect(x, y, w, h);
|
||||||
displayContext.drawImage(srcLayer, srcx, srcy, w, h, x, y, w, h);
|
displayContext.drawImage(srcLayer, srcx, srcy, w, h, x, y, w, h);
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
// If we ARE the source layer, no need to sync.
|
||||||
|
// Syncing would result in deadlock.
|
||||||
|
if (display === srcLayer)
|
||||||
|
scheduleCopyRect();
|
||||||
|
|
||||||
|
// Otherwise synchronize copy operation with source layer
|
||||||
|
else
|
||||||
|
srcLayer.sync(scheduleCopyRect);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user