summaryrefslogtreecommitdiff
path: root/cursor.js
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2013-04-19 11:36:41 -0500
committerJeremy White <jwhite@codeweavers.com>2013-04-19 11:36:41 -0500
commitbcffac0aa49f60d60e4dcbf1a66fc2b9f8a0548b (patch)
tree11b0d0b21504deb5b8e3db31e5ce3dc99259f71b /cursor.js
parent12fe9ebb9640d22f37579a6e79542a94c48b3b3c (diff)
Provide two levels of workaround for IE 10 cursor support.
The first approach is to use a moving image to simulate the cursor. This does not work well, so a second approach, involving static cursors is provided. That requires a site administrator to precreate all the cursors that can be used by a particular application set. A warning message strongly suggests using a different browser as well.
Diffstat (limited to 'cursor.js')
-rw-r--r--cursor.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/cursor.js b/cursor.js
index e3f6e0e..cafdf65 100644
--- a/cursor.js
+++ b/cursor.js
@@ -88,5 +88,9 @@ SpiceCursorConn.prototype.set_cursor = function(cursor)
var pngstr = create_rgba_png(cursor.header.height, cursor.header.width, cursor.data);
var curstr = 'url(data:image/png,' + pngstr + ') ' +
cursor.header.hot_spot_x + ' ' + cursor.header.hot_spot_y + ", default";
- document.getElementById(this.parent.screen_id).style.cursor = curstr;
+ var screen = document.getElementById(this.parent.screen_id);
+ screen.style.cursor = 'auto';
+ screen.style.cursor = curstr;
+ if (window.getComputedStyle(screen, null).cursor == 'auto')
+ SpiceSimulateCursor.simulate_cursor(this, cursor, screen, pngstr);
}