Commit Graph

655 Commits

Author SHA1 Message Date
Vagn Johansen 9f554fcdf7 Set FBU.bytes to 1 in encHandlers.COPYRECT
FBU.bytes must be set before return false to indicate that the FBU
header has been read. If not set then "if (FBU.bytes == 0) { ..}"
in framebufferUpdate will be entered and the copyrect header will
be interpreted as a new FBU leading to a "unsupported encoding"
disconnect error.
2013-04-16 19:17:50 +02:00
Joel Martin 7c1cd93744 Remove references to wsproxy.
Also, update nova-novncproxy to import websockify instead of wsproxy.
2013-04-15 12:22:34 -05:00
Joel Martin 7dc038efd9 Add gimite/web-socket-js submodule for DFSG compliance. 2013-04-12 08:21:33 -05:00
Joel Martin cededc4d14 Merge pull request #244 from djipko/common_conf_to_oslo_conf
Import cfg from oslo in nova-novncproxy
2013-04-08 10:32:03 -07:00
Nikola Dipanov de0f8773b1 Import cfg from oslo in nova-novncproxy
Upstram OpenStack Nova package has moved the config engine into a
separate package. Mirror that change in the novnc script.
2013-04-08 15:42:56 +02:00
Joel Martin 60d991774b Merge pull request #241 from astrand/html-cleanup
Minimize differences between vnc.html and vnc_auto.html
2013-04-05 06:46:52 -07:00
Peter Åstrand (astrand) 33f5d3bd92 Sync more header meta stuff from vnc.html:
* UTF-8 charset defintition.

* Define IE=edge for X-UA-Compatible.

* Add Apple iOS Safari settings.
2013-04-05 09:30:10 +02:00
Peter Åstrand (astrand) 9f0d23de4d Move over comment about URL connect parameters from vnc_auto.html. 2013-04-05 09:29:08 +02:00
Peter Åstrand (astrand) b597bdd1ec Fix typo:
names="apple-mobile-web-app-status-bar-style"

should be:

name="apple-mobile-web-app-status-bar-style"
2013-04-05 09:22:19 +02:00
Joel Martin c2b1409a43 Merge pull request #239 from astrand/html-cleanup
Tweak order/whitespace/style to match vnc.html more closely.
2013-04-04 07:22:37 -07:00
Peter Åstrand (astrand) e84101b3e7 Tweak order/whitespace/style to match vnc.html more closely. No
functional changes.
2013-04-03 16:22:21 +02:00
Joel Martin 3b2acc2258 Merge pull request #225 from Medical-Insight/crlf-to-lf
Consistent Unix line endings
2013-01-31 06:58:33 -08:00
jalf 301fc915a6 Converted to unix line endings 2013-01-31 11:24:04 +01:00
jalf b1b342a97e Capture mouse events and filter irrelevant ones 2013-01-30 13:17:50 +01:00
jalf 0d0f754aad Listen for mouseup events from window as well as target element
Pressing an holding a mouse button and then moving the mouse out of the
canvas before releasing meant that onmouseup was never triggered.
2013-01-30 13:17:32 +01:00
jalf 8a147535de Clamp mouseclick coordinates to target element bounds 2013-01-30 13:17:32 +01:00
Joel Martin 49d5cee91e Merge pull request #220 from vaj/keyinput
Ctrl+'-' won't work on a US keyboad with the latest Firefox.
2012-12-23 21:09:16 -08:00
Hirokazu Takahashi 37a3081f05 Ctrl+'-' won't work on a US keyboad with Firefox.
Firefox 17 generates 173 as the keycode for the minus key.
2012-12-23 18:32:28 +09:00
Joel Martin d55f5377bb Merge pull request #216 from komawar/config-module
Changed the config module which includes CONF
2012-11-30 11:58:50 -08:00
Nikhil Komawar 902c6fb37f Changed the config module which includes CONF
currently CONF was attempted of being imported from nova config.py
rather than openstack/common/cfg.py. this commit fixes that.
2012-11-30 11:50:57 -05:00
Joel Martin 705c54edb6 Sync with websockify.
Pull c33f0b52e7 from websockify.

- Fix for python2.4 with URL parsing.
- Set binaryType earlier in Opera 12.10 to avoid receiving a blob.
- Re-order client and target processing so that pending client data
  has an opportunity to be sent when the target closes.
2012-11-14 12:28:22 -05:00
Joel Martin 361cde7c96 Merge pull request #214 from otherwiseguy/master
Update utils/nova-novncproxy to work with nova master branch
2012-11-08 15:12:24 -08:00
Terry Wilson f167ea0ecc Mirror FLAGS->CONF change in Nova
Nova recently removed parse_args from flags.py. This updates the
nova proxy to properly use CONF instead of FLAGS.
2012-11-08 17:49:12 -05:00
Joel Martin 3516bdf3fa util/launch.sh: add --web option and try /usr/share/novnc 2012-11-01 11:35:35 -05:00
Joel Martin 51562999c7 util.js: script load sequential execution changes.
Related to issue: https://github.com/kanaka/noVNC/issues/205

Split out the function to load a single script to Util.load_script.

In order to get sequential load, when on IE set the script defer flag.
It is currently working on webkit and firefox but just in case also
set the script.async flag to make sure that scripts execute in the
order they are added. Scripts should still load in parallel.
2012-11-01 10:47:37 -05:00
Joel Martin e7e6660272 include/playback.js: support binary (non-base64) data files.
Data files should now set the variable VNC_frame_encoding to either
"binary" or "base64". The python websockify recording mode adds this
automatically based on what is negotiated with the client being
recorded.
2012-10-26 18:08:00 -05:00
Joel Martin 49578da448 sync with websockify
Pull in websockify 1669139
2012-10-26 18:07:25 -05:00
Joel Martin c95456c0e1 rfb.js: skip tight when true color is disabled.
Generally this means falling back to 8-bit colour mapped hextile which
is uses more bandwidth and is likely slower that tight with 24-bit
true color.

This is related to this query:
http://superuser.com/questions/484790/how-to-use-8-bit-mode-with-novnc
2012-10-23 16:21:22 -05:00
Joel Martin 73ee4fa7cc util.js: fix dynamic script load on IE 9 (again).
Use a mechanism described here to serialize the execution of scripts
under IE: http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
Basically, we set the src attribute but do not append the script to
the body/head until after readyState is "loaded". Unfortunately, Opera
uses readyState but in a different way (always "loaded" for both load
and execution).

This is related to (and hopefully fixes) these issues:
https://github.com/kanaka/noVNC/issues/194,
https://github.com/kanaka/noVNC/issues/205,
https://github.com/kanaka/noVNC/issues/208.
2012-10-23 15:54:08 -05:00
Joel Martin 5514d29950 vnc.html: use standard HTML5 doctype.
The mobile doctype doesn't not seem to make any difference on iOS so
I'm dropping it and just going with the standard HTML5 version since
the wapforum mobile version may cause issues with IE 10.
2012-10-19 12:18:48 -05:00
Joel Martin 57430b8c12 ui.js: fix drag button so it can be toggled off. 2012-10-19 12:18:21 -05:00
Joel Martin e881ce5a1b Merge remote branch 'Medical-Insight/non-square-cursor-fix' 2012-10-18 17:44:13 -05:00
Joel Martin 8e2d749605 util.js: script load sequential execution changes.
Related to issue: https://github.com/kanaka/noVNC/issues/205

Split out the function to load a single script to Util.load_script.

In order to get sequential load, when on IE set the script defer flag.
It is currently working on webkit and firefox but just in case also
set the script.async flag to make sure that scripts execute in the
order they are added. Scripts should still load in parallel.
2012-10-18 16:13:00 -05:00
Joel Martin 60106f240a Revert "supprt ALTGR key event"
This reverts commit 079504a6d2.
2012-10-17 15:37:24 -05:00
Joel Martin c527482ebf Merge pull request #195 from moobyfr/keyboard-altgr
Keyboard altgr
2012-10-17 13:30:50 -07:00
Joel Martin 35785a9081 Add binary/base64 data mode to perf/playback tests. 2012-10-17 11:58:13 -05:00
Joel Martin 6f4b1e4071 Refactor dynamic script loading. Add util.js:load_scripts()
Related to issue/pulls:
https://github.com/kanaka/noVNC/issues/194
https://github.com/kanaka/noVNC/pull/201
https://github.com/kanaka/noVNC/pull/202

In IE9, the window.onload event can fire before dynamically loaded
scripts have finished loading. This can result in either WebSocket (in
the case of vnc_auto.html) or RFB (in the case of vnc.html) not being
defined at the point when window.onload is called.

- Move the load_scripts routine from vnc.js to util.js (so that
  websockify can use it too). Also, refactor to work when load_scripts
  is called by a script that itself uses load_scripts. When the whole
  chain of dynamically loaded scripts is finished then call
  window.onscriptsload. Use this mechanism in all the places that
  depend on dynamic loading of scripts: vnc.html, vnc_auto.html,
  websock.js, tests/vnc_playback.html, and tests/vnc_perf.html.

- Use the new window.onscriptsload handler instead of window.onload.

- Remove include/start.js and do the script loading and startup event
  handling in include/ui.js instead.
2012-10-17 11:58:12 -05:00
vj 6f4cbb3f3c Always generate square cursor images in changeCursor (fix portrait mode issue).
This is a workaround for corrupted non-square cursors seen on some
Windows 7 machines with NVIDIA cards. The corruption only happens when
the screen is in portrait mode.
2012-10-17 09:56:20 +02:00
Joel Martin 7a6c94b6b9 Merge pull request #191 from takaha/altgr
support ALTGR key event
2012-10-16 08:09:35 -07:00
Joel Martin e16ad2fd02 Refactoring hot blocks to help Chrome optimizing compiler. 2012-10-15 13:48:07 -05:00
Joel Martin 1d728ace69 Change noVNC license to from LGPLv3 to MPL 2.0
The MPL 2.0 license is a "file-level" copyleft license vs the
"project-level" nature of the L/GPL. The intention of noVNC has
always been that it should be easy to incorporate into existing
projects and sites whether free/open or proprietary/commercial. The MPL
2.0 is designed for this sort of combination project but still
requires that any distributed modifications to noVNC source files must
also be published under the same license.

In addition, the MPL 2.0 allows the code to be used in L/GPL projects
(the secondary license clause). This means that any projects that are
already incorporating noVNC should not be impacted by this change and
in fact it should clarify the licensing situation (the exact
application of the L/GPL to web applications and interpreted code is
somewhat ambiguous).

The HTML, CSS, image and font files continue to be under more
permissive licenses (see LICENSE.txt). The included websockify python
code remains under a LGPLv3 license although the include/websock.js
file from the websockify component is now under MPL 2.0 as well.

Permission was received from other noVNC authors to make this change to their
code license on the following dates:

    - Chris Gordon (UI): Jun 24, 2012
    - Antoine Mercadal (DOM,*util.js): Oct 10, 2012
    - William Lightning (UltraVNC repeater): Oct 10, 2012
    - Mike Tinglof (tight encoding): Oct 15, 2012
2012-10-15 13:35:00 -05:00
Joel Martin ab7674ff73 include/base64.js: update to MPL 2.0 base64 code from Mozilla
This updated version is imported from:
http://hg.mozilla.org/mozilla-central/raw-file/ec10630b1a54/js/src/devtools/jint/sunspider/string-base64.js
2012-10-10 14:36:44 -05:00
Blindauer Emmanuel c76b2a8101 Handle Super and Menu keys (Windows keys) 2012-10-06 10:31:47 +02:00
Hirokazu Takahashi 079504a6d2 supprt ALTGR key event 2012-09-25 15:55:06 +09:00
Joel Martin 8dfd916946 Update websockify
Update to websockify febaeee85c

Gracefully handle errors when popping kwargs:
https://github.com/kanaka/websockify/pull/53
2012-09-21 07:09:45 -05:00
Joel Martin 8534fea664 debian/novnc.install: pick up include/start.js 2012-09-20 14:04:35 -05:00
Joel Martin d5fe15096b include/webutil.js: fix when 'chrome' global not present. 2012-09-17 17:18:44 -05:00
Joel Martin 6f955236e6 include/ui.js: call setBarPosition on initial load.
Call setBarPosition on initial load and not just when the window size
changes or scrolling happens.
2012-09-17 17:15:50 -05:00
Joel Martin 5f03c3d093 tcp-client.js: after read, try read again.
After a read completes it's possible more data is pending so issue an
immediate read again to pick this up quickly.
2012-09-17 17:15:50 -05:00
Joel Martin 2cde6e4380 include/vnc.js: dynamic load without document.write.
Instead of using document.write to load scripts, use createElement to
create and append script tags. document.write is problematic in a lot
of situation and in particular is not allowed in a Chrome
extension/packaged app.

Also, in webutil.js, instead of calling init_logging during parsing of
include/webutil.js, rely on the caller to do this. The problem is that
calling init_logging on parse tries to call Util logging functions and
the new model of dynamic load may not having Util loaded by the time
webutil is parsed.
2012-09-17 17:15:49 -05:00