mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Merge branch 'unstable' of ssh://guacamole.git.sourceforge.net/gitroot/guacamole/guacamole-common-js into unstable
This commit is contained in:
@@ -476,18 +476,25 @@ function GuacamoleClient(display, tunnelURL) {
|
|||||||
layer = new Layer(displayWidth, displayHeight);
|
layer = new Layer(displayWidth, displayHeight);
|
||||||
layers[index] = layer;
|
layers[index] = layer;
|
||||||
|
|
||||||
// Remove all children
|
// (Re)-add existing layers in order
|
||||||
display.innerHTML = "";
|
|
||||||
|
|
||||||
// Add existing layers in order
|
|
||||||
for (var i=0; i<layers.length; i++) {
|
for (var i=0; i<layers.length; i++) {
|
||||||
if (layers[i])
|
if (layers[i]) {
|
||||||
|
|
||||||
|
// If already present, remove
|
||||||
|
if (layers[i].parentNode === display)
|
||||||
|
display.removeChild(layers[i]);
|
||||||
|
|
||||||
|
// Add to end
|
||||||
display.appendChild(layers[i]);
|
display.appendChild(layers[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add cursor layer last
|
// Add cursor layer last
|
||||||
if (cursor != null)
|
if (cursor != null) {
|
||||||
|
if (cursor.parentNode === display)
|
||||||
|
display.removeChild(cursor);
|
||||||
display.appendChild(cursor);
|
display.appendChild(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user