allow RFB conf to specify default cursor
This commit is contained in:
parent
3b2acc2258
commit
c307d966d5
|
|
@ -55,7 +55,8 @@ Util.conf_defaults(conf, that, defaults, [
|
|||
['render_mode', 'ro', 'str', '', 'Canvas rendering mode (read-only)'],
|
||||
|
||||
['prefer_js', 'rw', 'str', null, 'Prefer Javascript over canvas methods'],
|
||||
['cursor_uri', 'rw', 'raw', null, 'Can we render cursor using data URI']
|
||||
['cursor_uri', 'rw', 'raw', null, 'Can we render cursor using data URI'],
|
||||
['default_cursor', 'wo', 'str', null, 'Default cursor']
|
||||
]);
|
||||
|
||||
// Override some specific getters/setters
|
||||
|
|
@ -648,7 +649,7 @@ that.changeCursor = function(pixels, mask, hotx, hoty, w, h) {
|
|||
};
|
||||
|
||||
that.defaultCursor = function() {
|
||||
conf.target.style.cursor = "default";
|
||||
conf.target.style.cursor = conf.default_cursor;
|
||||
};
|
||||
|
||||
return constructor(); // Return the public API interface
|
||||
|
|
|
|||
|
|
@ -142,6 +142,8 @@ Util.conf_defaults(conf, that, defaults, [
|
|||
['connectTimeout', 'rw', 'int', def_con_timeout, 'Time (s) to wait for connection'],
|
||||
['disconnectTimeout', 'rw', 'int', 3, 'Time (s) to wait for disconnection'],
|
||||
|
||||
['default_cursor', 'wo', 'str', 'default', 'Default cursor'],
|
||||
|
||||
// UltraVNC repeater ID to connect to
|
||||
['repeaterID', 'rw', 'str', '', 'RepeaterID to connect to'],
|
||||
|
||||
|
|
@ -214,7 +216,7 @@ function constructor() {
|
|||
}
|
||||
// Initialize display, mouse, keyboard, and websock
|
||||
try {
|
||||
display = new Display({'target': conf.target});
|
||||
display = new Display({'target': conf.target, 'default_cursor': conf.default_cursor});
|
||||
} catch (exc) {
|
||||
Util.Error("Display exception: " + exc);
|
||||
updateState('fatal', "No working Display");
|
||||
|
|
|
|||
Loading…
Reference in New Issue