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
9b9e741b
Commit
9b9e741b
authored
Sep 24, 2013
by
samhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On touch devices the default should be to use a remote cursor.
parent
97aefe5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
ui.js
include/ui.js
+9
-6
No files found.
include/ui.js
View file @
9b9e741b
...
...
@@ -24,6 +24,7 @@ connSettingsOpen : false,
popupStatusOpen
:
false
,
clipboardOpen
:
false
,
keyboardVisible
:
false
,
isTouchDevice
:
false
,
// Setup rfb object, load settings from browser storage, then call
// UI.init to setup the UI/menus
...
...
@@ -35,6 +36,8 @@ load: function (callback) {
start
:
function
(
callback
)
{
var
html
=
''
,
i
,
sheet
,
sheets
,
llevels
,
port
;
UI
.
isTouchDevice
=
'ontouchstart'
in
document
.
documentElement
;
// Stylesheet selection dropdown
sheet
=
WebUtil
.
selectStylesheet
();
sheets
=
WebUtil
.
getStylesheets
();
...
...
@@ -75,7 +78,7 @@ start: function(callback) {
UI
.
initSetting
(
'password'
,
''
);
UI
.
initSetting
(
'encrypt'
,
(
window
.
location
.
protocol
===
"https:"
));
UI
.
initSetting
(
'true_color'
,
true
);
UI
.
initSetting
(
'cursor'
,
tru
e
);
UI
.
initSetting
(
'cursor'
,
!
UI
.
isTouchDevic
e
);
UI
.
initSetting
(
'shared'
,
true
);
UI
.
initSetting
(
'view_only'
,
false
);
UI
.
initSetting
(
'connectTimeout'
,
2
);
...
...
@@ -97,7 +100,7 @@ start: function(callback) {
// };
// Show mouse selector buttons on touch screen devices
if
(
'ontouchstart'
in
document
.
documentElement
)
{
if
(
UI
.
isTouchDevice
)
{
// Show mobile buttons
$D
(
'noVNC_mobile_buttons'
).
style
.
display
=
"inline"
;
UI
.
setMouseButton
();
...
...
@@ -356,8 +359,8 @@ toggleSettingsPanel: function() {
if
(
UI
.
rfb
.
get_display
().
get_cursor_uri
())
{
UI
.
updateSetting
(
'cursor'
);
}
else
{
UI
.
updateSetting
(
'cursor'
,
tru
e
);
$D
(
'noVNC_cursor'
).
disabled
=
fals
e
;
UI
.
updateSetting
(
'cursor'
,
!
UI
.
isTouchDevic
e
);
$D
(
'noVNC_cursor'
).
disabled
=
tru
e
;
}
UI
.
updateSetting
(
'clip'
);
UI
.
updateSetting
(
'shared'
);
...
...
@@ -518,8 +521,8 @@ updateVisualState: function() {
UI
.
rfb
.
get_display
().
get_cursor_uri
())
{
$D
(
'noVNC_cursor'
).
disabled
=
connected
;
}
else
{
UI
.
updateSetting
(
'cursor'
,
tru
e
);
$D
(
'noVNC_cursor'
).
disabled
=
fals
e
;
UI
.
updateSetting
(
'cursor'
,
!
UI
.
isTouchDevic
e
);
$D
(
'noVNC_cursor'
).
disabled
=
tru
e
;
}
$D
(
'noVNC_shared'
).
disabled
=
connected
;
$D
(
'noVNC_view_only'
).
disabled
=
connected
;
...
...
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