Fix focus/clipboard related to mouse/keyboard refactor.
This commit is contained in:
parent
d3796c149e
commit
d1bd5ec7d4
|
@ -37,7 +37,6 @@ cdef('cursor_uri', 'raw', null, 'Can we render cursor using data URI');
|
|||
cdef('target', 'dom', null, 'Canvas element for VNC viewport');
|
||||
cdef('focusContainer', 'dom', document, 'DOM element that traps keyboard input');
|
||||
cdef('true_color', 'bool', true, 'Request true color pixel data');
|
||||
cdef('focused', 'bool', true, 'Capture and send key strokes');
|
||||
cdef('colourMap', 'raw', [], 'Colour map array (not true color)');
|
||||
cdef('scale', 'float', 1, 'VNC viewport scale factor');
|
||||
|
||||
|
@ -204,8 +203,6 @@ function constructor() {
|
|||
conf.cursor_uri = false;
|
||||
}
|
||||
|
||||
conf.focused = true;
|
||||
|
||||
Util.Debug("<< Canvas.init");
|
||||
return that ;
|
||||
}
|
||||
|
|
|
@ -165,6 +165,13 @@ that.set_local_cursor = function(cursor) {
|
|||
that.get_canvas = function() {
|
||||
return canvas;
|
||||
};
|
||||
that.get_keyboard = function() {
|
||||
return keyboard;
|
||||
};
|
||||
that.get_mouse = function() {
|
||||
return mouse;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -145,8 +145,8 @@ load: function(target) {
|
|||
|
||||
// Unfocus clipboard when over the VNC area
|
||||
$D('VNC_screen').onmousemove = function () {
|
||||
var canvas = UI.rfb.get_canvas();
|
||||
if ((! canvas) || (! canvas.get_focused())) {
|
||||
var keyboard = UI.rfb.get_keyboard();
|
||||
if ((! keyboard) || (! keyboard.get_focused())) {
|
||||
$D('VNC_clipboard_text').blur();
|
||||
}
|
||||
};
|
||||
|
@ -399,11 +399,13 @@ disconnect: function() {
|
|||
},
|
||||
|
||||
canvasBlur: function() {
|
||||
UI.rfb.get_canvas().set_focused(false);
|
||||
UI.rfb.get_keyboard().set_focused(false);
|
||||
UI.rfb.get_mouse().set_focused(false);
|
||||
},
|
||||
|
||||
canvasFocus: function() {
|
||||
UI.rfb.get_canvas().set_focused(true);
|
||||
UI.rfb.get_keyboard().set_focused(true);
|
||||
UI.rfb.get_mouse().set_focused(true);
|
||||
},
|
||||
|
||||
clipClear: function() {
|
||||
|
|
Loading…
Reference in New Issue