Fixed layer positioning.
authorMichael Jumper <zhangmaike@users.sourceforge.net>
Sun, 20 Feb 2011 21:50:22 +0000 (13:50 -0800)
committerMichael Jumper <zhangmaike@users.sourceforge.net>
Sun, 20 Feb 2011 21:50:22 +0000 (13:50 -0800)
src/main/resources/guacamole.js
src/main/resources/layer.js

index ffd9053..8aaef96 100644 (file)
@@ -34,6 +34,9 @@ function GuacamoleClient(display, tunnelURL) {
     var stateChangeHandler = null;
     var pollResponse = 1; // Default to polling - will be turned off automatically if not needed
 
+    // Display must be relatively positioned for mouse to be handled properly
+    display.style.position = "relative";
+
     function setState(state) {
         if (state != currentState) {
             currentState = state;
@@ -560,10 +563,8 @@ function GuacamoleClient(display, tunnelURL) {
             displayHeight = parseInt(parameters[1]);
 
             // Update (set) display size
-            if (display) {
-                display.style.width = displayWidth + "px";
-                display.style.height = displayHeight + "px";
-            }
+            display.style.width = displayWidth + "px";
+            display.style.height = displayHeight + "px";
 
             // Set cursor layer width/height
             if (cursor != null)
index da5606c..ae5cf22 100644 (file)
@@ -26,7 +26,7 @@ function Layer(width, height) {
     function resize(newWidth, newHeight) {
         display.style.position = "absolute";
         display.style.left = "0px";
-        display.style.right = "0px";
+        display.style.top = "0px";
 
         display.width = newWidth;
         display.height = newHeight;