Commit Graph

1775 Commits

Author SHA1 Message Date
Joel Martin a4ff1f573d Fix ordering of tightPNG fills.
This addresses issue #65:
https://github.com/kanaka/noVNC/issues/65

When tightPNG encoded rects were received, any fill types were
immediately drawn to the canvas while images (PNG, JPEGs) were queued
for loading. This can cause screen corruption when things are changing
rapidly due to the misordering of fills vs images.

Also, remove the onload setting in each image on the queue and instead
decrease the tight image queue scanning interval (to 40ms or 25
scans per second).
2011-07-06 16:32:42 -05:00
Joel Martin c6fd71536f Show full pixelFormat received from server.
For debugging issue #70: https://github.com/kanaka/noVNC/issues/70
2011-07-01 13:17:20 -05:00
Joel Martin 61fc1f2287 Remove extraneous question mark.
Part of https://github.com/kanaka/noVNC/issues/69

Pull from websockify b590289de5.
2011-06-28 16:29:29 -05:00
Joel Martin 96513f5645 Merge branch 'master' of git@github.com:kanaka/noVNC 2011-06-28 16:23:57 -05:00
Joel Martin 0b7bc4e986 Only append random string to swf path in IE.
Issue https://github.com/kanaka/noVNC/issues/69

Thanks https://github.com/EdSchouten for the catch.

Import from websockify 9a2b50d8.
2011-06-28 16:22:50 -05:00
Joel Martin 95ff836e45 Merge pull request #67 from EdSchouten/master
Add support for setting the WebSocket URI path.
2011-06-27 07:26:00 -07:00
Ed Schouten 3b8caa4b09 Add support for passing the file name to get.
This change allows one to implement a single WebSockets proxy, which
multiplexes connections to different hosts.
2011-06-27 10:55:03 +02:00
Joel Martin 8a7ce3da6a Clarify companies/projects link description. 2011-06-26 16:02:42 -05:00
Joel Martin 68edd7f4f8 Move project/companies info to wiki.
Just have a list here without all the links.
2011-06-26 15:55:44 -05:00
Joel Martin 8c305c60ad Pull fix of recording from websockify.
Pull websockify 7f487fdbd.

The reocrd parameter will turn on recording of all messages sent
to and from the client. The record parameter is a file prefix. The
full file-name will be the prefix with an extension '.HANDLER_ID'
based on the handler ID.
2011-06-26 14:21:56 -05:00
Joel Martin fa8f14d56d Fix playback of recorded VNC.
- Update test mode calls to work with separate websock module.

- Pull in include/websock.js update 7f487fdbd from websockify.
2011-06-26 14:17:42 -05:00
Anthony Young 2270c7b5ae add ability to set title from url 2011-06-26 13:21:45 -05:00
Joel Martin 939cc6d563 Broadway link cleanup. 2011-06-13 14:29:51 -05:00
Joel Martin 6a545db4cb Merge branch 'master' of git@github.com:kanaka/noVNC 2011-06-13 14:28:38 -05:00
Joel Martin a6f3281283 Broadway HTML5 GDK backend link.
Broadway uses noVNC keyboard/input handling. Link to it.
2011-06-13 14:27:47 -05:00
Joel Martin 3859e1d35c Merge pull request #59 from smussmann/patch-1
Fixed minor typo in util/launch.sh informational output (s/to to/to/)
2011-05-19 10:08:30 -07:00
Sam Mussmann 19ed81fdff Fixed minor typo
s/to to/to/
2011-05-19 09:37:28 -07:00
Joel Martin 557efaf856 utils/websocket.py: disable debug output. 2011-05-12 12:55:04 -05:00
Joel Martin 7d14602759 Pull websockify 284ef3cc1a54
Including HyBi-07 support and refactor of send/recv.
2011-05-12 12:33:57 -05:00
Joel Martin 5210330a6c Refactor configuration attributes.
- Add conf_defaults which accepts an array of configuration
  attributes.
- Split out user configuration defaults from the actual configuration
  object.
- Add mode field and enforce read-only, write-once, read-write modes.
2011-05-11 17:31:53 -05:00
Joel Martin d890e8640f API changes/cleanup.
API changes:
    - include/canvas.js renamed to include/display.js
    - Display.rescale() method removed from API. Use Display.set_scale() instead.
    - Make logo configuration attribute of Display and display it when
      clear() is called if it is set.

API deprecations:
    - use RFB onUpdateState instead of updateState.
    - use RFB onClipboard instead of clipboardReceive.

See https://github.com/kanaka/noVNC/wiki/ModuleAPI for detailed noVNC
modules and API description.

Expand and normalize the event/callback interfaces. Standize on
"onEventName" form for callbacks.

    Callback Renames:
        - RFB updateState -> onUpdateState
        - RFB clipboardReceive -> onClipboard
        - Keyboard keyPress -> onKeyPress
        - Mouse mouseButton -> onMouseButton
        - Mouse mouseMove -> onMouseMove

    Callback Additions:
        - RFB onPasswordRequired
        - RFB onBell
        - RFB onFBUReceive
        - RFB onFBUComplete

Other:
- Add array type support to Util.conf_default()
- Removed a bunch of routines from the Display API that were just used
  internally and not actually by noVNC: flush, setFillColor,
  imageDataGet, imageDataCreate, rgbxImageData, rgbxImageFill,
  cmapImageData, cmapImageFill.
- More keyboard/mouse logging when debug turned on.
- Some JSLinting
2011-05-11 15:55:44 -05:00
Joel Martin 2fb665ec94 Merge branch 'master' of git@github.com:kanaka/noVNC 2011-05-09 18:09:59 -05:00
Joel Martin f31eeaa8ab Stop sending empty frames.
Pull from websockify a339a4856.
2011-05-09 17:22:02 -05:00
Joel Martin 1a2371fcd2 include/canvas.js: missed scale fix. 2011-04-29 14:04:40 -05:00
Joel Martin 58b4c53661 Fix scale/rescale attribute/hooks.
Still buggy so not yet activated in the UI, but the hooks are at least
here.
2011-04-29 14:01:40 -05:00
Joel Martin 1ac21e2941 README.md: adjust links to clarify.
Separate the links from each other so it's obvious where the links
are.
2011-04-24 12:52:19 -05:00
Joel Martin 4529ec0176 README.md: Add OpenStack doc and video link. 2011-04-24 12:45:58 -05:00
Joel Martin 667ef9bae8 README.md: fix wiki links.
github changed something about relative links.
2011-04-24 12:34:09 -05:00
Joel Martin bbee8098c2 tests/browser.js: Missing. Needed for arrays.html test. 2011-04-21 08:45:04 -05:00
Joel Martin 41b9ae6ec9 Sync with websockify. Save handshake headers.
Derived classes will almost certainly want to make use of the raw
info.
2011-04-19 09:37:43 -05:00
Joel Martin eb6426b4bc input.js: remove redundant switch case statments.
Issue #21 - non-US key handling.
2011-04-15 08:48:04 -06:00
Joel Martin dc4131b14a input.js: uncomment special key handling for non-US keys.
Issue #21 - non-US keyboard layouts.

The code section for tab, backspace and enter was commented out for
testing but got checked in that way. Fix that.
2011-04-15 08:40:20 -06:00
Joel Martin b7c9657b83 include/input.js: change to LGPL-2 or later.
Requested by Alexander Larsson at Red Hat to allow incorporation of
solution into HTML5 gtk 3.0 backend.
2011-04-14 11:25:11 -06:00
Joel Martin fac149ddbe input.js: adjust special key handling for non-US keys.
Issue #21 - non-US keyboard layouts.

Only identify some keys as special during the keyDown event so that
when using non-US keyboards the values don't overlap with the values
for normal keys.

Some keys have to still be identified in both keyDown and keyPress
since they generate both: backspace and enter for Firefox and Opera,
tab for Opera.
2011-04-12 09:06:11 -05:00
Joel Martin 303819eaa9 util/json2graph.py: new location for json2graph.py.
Also clarify usage statement with legend height adjustment.

Remove console.log in arrays.js so that it works in firefox without
firebug.
2011-04-06 11:19:02 -05:00
Joel Martin 40e5c25ad8 utils/rebind, utils/u2x11: use /usr/bin/env 2011-04-06 10:05:59 -05:00
Joel Martin 0a92014700 include/webutil.js: fix dirObj undefined attribute. 2011-04-05 14:46:22 -05:00
Joel Martin d0c29bb679 Fix copyright year to 2011. 2011-04-05 14:44:47 -05:00
Joel Martin c96f900336 Refactor keyboard event handling.
This is part of addressing issue #21 - non-US keyboard layouts.

There are several challenges when dealing with keyboard events:
  - The meaning and use of keyCode, charCode and which depends on
    both the browser and the event type (keyDown/Up vs keyPress).
  - We cannot automatically determine the keyboard layout
  - The keyDown and keyUp events have a keyCode value that has not
    been translated by modifier keys.
  - The keyPress event has a translated (for layout and modifiers)
    character code but the attribute containing it differs. keyCode
    contains the translated value in WebKit (Chrome/Safari), Opera
    11 and IE9. charCode contains the value in WebKit and Firefox.
    The which attribute contains the value on WebKit, Firefox and
    Opera 11.
  - The keyDown/Up keyCode value indicates (sort of) the physical
    key was pressed but only for standard US layout. On a US
    keyboard, the '-' and '_' characters are on the same key and
    generate a keyCode value of 189. But on an AZERTY keyboard even
    though they are different physical keys they both still
    generate a keyCode of 189!
  - To prevent a key event from propagating to the browser and
    causing unwanted default actions (such as closing a tab,
    opening a menu, shifting focus, etc) we must suppress this
    event in both keyDown and keyPress because not all key strokes
    generate on a keyPress event. Also, in WebKit and IE9
    suppressing the keyDown prevents a keyPress but other browsers
    still generated a keyPress even if keyDown is suppressed.

For safe key events, we wait until the keyPress event before
reporting a key down event. For unsafe key events, we report a key
down event when the keyDown event fires and we suppress any further
actions (including keyPress).

In order to report a key up event that matches what we reported
for the key down event, we keep a list of keys that are currently
down. When the keyDown event happens, we add the key event to the
list. If it is a safe key event, then we update the which attribute
in the most recent item on the list when we received a keyPress
event (keyPress should immediately follow keyDown). When we
received a keyUp event we search for the event on the list with
a matching keyCode and we report the character code using the value
in the 'which' attribute that was stored with that key.

For character codes above 255 we use a character code to keysym lookup
table. This is generated using the util/u2x11 script contributed by
Colin Dean (xvpsource.org).
2011-04-05 14:26:54 -05:00
Joel Martin d1bd5ec7d4 Fix focus/clipboard related to mouse/keyboard refactor. 2011-04-03 17:51:47 -05:00
Joel Martin d3796c149e API change: Mouse/kbd handling to include/input.js
API change: for intergrators that explicitly include the Javascript
files (that do not use include/vnc.js)js, include/input.js is a new
file that must also be included.

The mouse and keyboard handling could be useful on its own so split it
out into a Keyboard and Mouse class in include/input.js.

This refactoring is preparation to deal with issue #21 - non-US
keyboard layouts.
2011-04-03 17:30:45 -05:00
Joel Martin dec1861127 Merge branch 'master' of git@github.com:kanaka/noVNC 2011-03-29 15:47:58 -05:00
Joel Martin f899070482 IE9 fixes: mouse, doctype. Adobe Flash link.
Fix mouse button mapping in IE9. All browsers have converged on
a standard left=0, middle=1, right=2 ... all except IE that is.

Add html5 doctype to tests.

In vnc_perf test, use do_test instead of start for function name since
start is a keyword in IE.

In error about Flash give a link to Adobe's download page.
2011-03-29 15:44:03 -05:00
Phil Phillips e9155818c8 Make scripts more compatible across OSes 2011-03-27 04:18:08 +08:00
Joel Martin 0b6292b8c0 No exception if noVNC_logo is undefined. 2011-03-25 09:01:53 -05:00
Joel Martin 8a377d7a95 Ignore utils/rebind.so 2011-03-23 21:23:08 -05:00
Joel Martin 81bcf70fdc Higher connectTimeout default with web-socket-js.
Current timeout is 2 seconds for connect timeout. Use 5 seconds if
web-socket-js (Flash WebSockets emulator) is being used. On Windows XP
with Flash 10.2.152.26, connecting seems to take quite a bit longer
than it probably should. This should make it work more consistently.
2011-03-22 14:24:55 -05:00
Joel Martin bbd21ca7b5 Update web-socket-js to bb5797cad.
Syncs with same change to websockify (7534574a2f).

Primary change is removal of FABridge interface.

Seems to improve overall latency by perhaps 10%. Also, the slowdown
over time in Opera is about half as bad (but still there).
2011-03-16 10:33:01 -05:00
Joel Martin 5e55378b6e test/*.html: use "../include" instead of symlink.
This allows tests to work on the github pages site.
2011-03-14 19:05:42 -05:00
Joel Martin 468a9cc44a tests/keyboard.html: fix getKeysym call. 2011-03-14 18:54:16 -05:00