Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
d1bd5ec7
Commit
d1bd5ec7
authored
Apr 03, 2011
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix focus/clipboard related to mouse/keyboard refactor.
parent
d3796c14
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
canvas.js
include/canvas.js
+0
-3
rfb.js
include/rfb.js
+7
-0
ui.js
include/ui.js
+6
-4
No files found.
include/canvas.js
View file @
d1bd5ec7
...
@@ -37,7 +37,6 @@ cdef('cursor_uri', 'raw', null, 'Can we render cursor using data URI');
...
@@ -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
(
'target'
,
'dom'
,
null
,
'Canvas element for VNC viewport'
);
cdef
(
'focusContainer'
,
'dom'
,
document
,
'DOM element that traps keyboard input'
);
cdef
(
'focusContainer'
,
'dom'
,
document
,
'DOM element that traps keyboard input'
);
cdef
(
'true_color'
,
'bool'
,
true
,
'Request true color pixel data'
);
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
(
'colourMap'
,
'raw'
,
[],
'Colour map array (not true color)'
);
cdef
(
'scale'
,
'float'
,
1
,
'VNC viewport scale factor'
);
cdef
(
'scale'
,
'float'
,
1
,
'VNC viewport scale factor'
);
...
@@ -204,8 +203,6 @@ function constructor() {
...
@@ -204,8 +203,6 @@ function constructor() {
conf
.
cursor_uri
=
false
;
conf
.
cursor_uri
=
false
;
}
}
conf
.
focused
=
true
;
Util
.
Debug
(
"<< Canvas.init"
);
Util
.
Debug
(
"<< Canvas.init"
);
return
that
;
return
that
;
}
}
...
...
include/rfb.js
View file @
d1bd5ec7
...
@@ -165,6 +165,13 @@ that.set_local_cursor = function(cursor) {
...
@@ -165,6 +165,13 @@ that.set_local_cursor = function(cursor) {
that
.
get_canvas
=
function
()
{
that
.
get_canvas
=
function
()
{
return
canvas
;
return
canvas
;
};
};
that
.
get_keyboard
=
function
()
{
return
keyboard
;
};
that
.
get_mouse
=
function
()
{
return
mouse
;
};
...
...
include/ui.js
View file @
d1bd5ec7
...
@@ -145,8 +145,8 @@ load: function(target) {
...
@@ -145,8 +145,8 @@ load: function(target) {
// Unfocus clipboard when over the VNC area
// Unfocus clipboard when over the VNC area
$D
(
'VNC_screen'
).
onmousemove
=
function
()
{
$D
(
'VNC_screen'
).
onmousemove
=
function
()
{
var
canvas
=
UI
.
rfb
.
get_canvas
();
var
keyboard
=
UI
.
rfb
.
get_keyboard
();
if
((
!
canvas
)
||
(
!
canvas
.
get_focused
()))
{
if
((
!
keyboard
)
||
(
!
keyboard
.
get_focused
()))
{
$D
(
'VNC_clipboard_text'
).
blur
();
$D
(
'VNC_clipboard_text'
).
blur
();
}
}
};
};
...
@@ -399,11 +399,13 @@ disconnect: function() {
...
@@ -399,11 +399,13 @@ disconnect: function() {
},
},
canvasBlur
:
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
()
{
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
()
{
clipClear
:
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment