Commit Graph

991 Commits

Author SHA1 Message Date
Samuel Mannehed 772dc0d017 Update copyright 2016-09-03 19:26:29 +02:00
Samuel Mannehed 1a97a3f95d Fix indentation in list of encodings 2016-09-01 16:00:22 +02:00
Samuel Mannehed 0dc99e4038 Move QEMUExtendedKeyEvent encoding
The encoding list is ordered by number.
2016-09-01 15:59:01 +02:00
Samuel Mannehed 8a8e9d6080 Add missing commas and semicolons 2016-09-01 15:56:28 +02:00
Solly Ross bfc1826f4b Merge pull request #596 from danielhb/master
QEMU RFB extension

Fixes #21 🎉 (again)
2016-08-29 13:28:15 -04:00
Daniel Henrique Barboza 4be84fd628 QEMU RFB extension - keyboard.js changes
Added a 'QEMUKeyEventDecoder' method to deal with the
key events generated when the QEMU extension is active. Another
method, 'TrackQEMUKeyState', was also created with this same
goal.

Although both methods have similaries with the existing methods
'KeyEventDecoder' and 'TrackKeyState', specially when dealing
with 'supress' and 'releaseall', the logic behind the QEMU extension
does not required keysym generation for most cases (some NumPad keys
are an exception) and, as such, there is no need to treat 'keyPressed'
events and to handle char modifiers.

'TrackQEMUKeyState' also handles a Windows scenario where the
'AltGR' key generates CtrlLeft and AltRight keystrokes. The solution
was to avoid this specific combination to be sent to the VNC server,
discarding the extra 'CtrlLeft' key. Considering that the user can
send CtrlLeft+AltLeft, CtrlRight+AltRight and even CtrlRight+AltLeft,
this workaround to allow Windows users to use AltGR in their noVNC
sessions is worthwhile.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
2016-08-26 17:34:39 -03:00
Daniel Henrique Barboza 8d09ab06f4 QEMU RFB extension - rfb.js and input.js changes
In input.js, a new keyboard handler was added to deal exclusively
with the QEMU key event extension. '_onKeyPress()' signature
was changed to allow the same method to treat both cases.

The extension will only be enabled if the browser has support
for the KeyboardEvent.code property.

Changes in rfb.js:

- added a new extension code, QEMUExtendedKeyEvent, value -258.

- handleKeyPress now receives 'keyevent' instead of 'keysym' and
'down'. Both values are retrieved from keyevent as they were
in the previous signature. This method now can send QEMU RFB
extended key messages if the flag was set to 'true'.

- tests/test.rfb.js were changed folowing the onKeyPress() signature
change.

- added a new function to send the QEMU extended key message.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
2016-08-26 17:34:39 -03:00
Daniel Henrique Barboza 7ab542ef74 QEMU RFB extension - new file xtscancodes.js
This new file contains the XT scancode mapping that
the extension will use in rfb.js file.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
2016-08-26 17:06:42 -03:00
samhed aa171cb607 Add missing return values 2016-08-26 12:20:51 +02:00
samhed eef646c320 Remove unnecessary debug logging 2016-08-26 12:19:30 +02:00
samhed 7db7101e53 Remove bad trailing commas 2016-08-26 12:18:28 +02:00
samhed 047f5f590d Merge branch 'continuousupdates' into noVNCmaster 2016-08-26 12:06:05 +02:00
Trần Tuấn Anh ef662ccc6b Removing unused import (#642) 2016-08-26 11:09:22 +02:00
samhed f14f05caff Add support for ContinuousUpdates
Instead of requesting frame buffer updates we can, if the server
supports it, continuously recieve frame buffer updates at a rate
determined by the server.

The server can use fencing messages and measure response times to
determine how often it will continue to send updates.
2016-08-26 11:04:19 +02:00
Samuel Mannehed 828debf69a Add missing event argument and curly bracket 2016-08-25 16:49:02 +02:00
Samuel Mannehed 708509d691 Fix window close warning
The code didn't follow current API for the beforeunload event.
2016-08-25 15:40:11 +02:00
Samuel Mannehed 9ea3752411 Proper spacing 2016-08-25 15:16:04 +02:00
Samuel Mannehed 1e2019b7ba Fix the extra keys
Commit 529c64e1036b622ff971b1a0cd13856837d3a9eb broke this. #shame#
2016-08-25 14:40:21 +02:00
Solly Ross 61e38102c3 Merge pull request #583 from kanaka/bug/misc-fixes
Misc Fixes (ImageData Constructor Detection and Firefox Nightly Bug Workaround)
2016-08-23 16:00:48 -04:00
Solly Ross 5746ce3239 Merge pull request #632 from patrakov/master
Fixed BLIT RGB data buffer size

The RGB buffer size was incorrectly marked as `pixels * 4` instead of the correct `pixels * 3`

Fixes #615
2016-08-23 15:11:03 -04:00
Solly Ross 2a10f1bd56 Revert poor workaround for brief Firefox bug
This commit reverts a fix for a bug which briefly occured on certain
nightlies of Firefox.  It was never intended to persist in the code
base, and is causing other actual errors to be swallowed.
2016-08-23 15:02:45 -04:00
Solly Ross e93807ade2 Fix ImageData Constructor Support Detection
Our support detection for the `ImageData(data, width, height)` constructor
would fail in certain browsers because the size of a 1x1 ImageData's
Uint8ClampedArray is 4, not 1.
2016-08-23 15:01:31 -04:00
Joel Martin aef8731666 Merge pull request #640 from nunojusto/patch-1
Update launch.sh
2016-08-16 17:34:38 -05:00
nunojusto 4d9cd40657 Update launch.sh
Just a correction of port in use test algoritm.
This way we will not have problems when using port X and having some other service using zyX or any *X port
2016-08-16 22:10:14 +01:00
Alexander E. Patrakov 0f9ddc3e64 Fixed RGB data buffer size (#615) 2016-07-31 21:55:04 +05:00
Solly Ross d3cfa2d79b Release 0.6.1
Fixes version number mismatch (also adds more detailed instructions
for releasing).

Fixes #628
2016-07-04 15:29:00 -04:00
Solly Ross 5746991745 Release 0.6.0
This bumps the release version to 0.6.0
2016-07-01 15:42:14 -04:00
Solly Ross 2e0fbfd6d4 Fix missing mistyped setTimeout handler in UI
This commit fixes a mistyped setTimeout handler that would result
in the desired function not getting called (due to a missing set
of parentheses).  It also removes some uncessary anonymous functions,
and just passes the function objects directly to setTimeout.
2016-07-01 15:42:14 -04:00
Joel Martin 4e3eb55b06 Clarify that utils/launch.sh is MPL-2.0
Also, note in the top-level license file that the default noVNC
license for files that are not explicitly marked or mentioned in
the LICENSE.txt file are by default MPL-2.0 licensed.
2016-06-13 10:22:43 -05:00
samhed caceea56f1 Proper error handling for tight filters
Don't throw an exception when we encounter an unsupported tight
subencoding.
2016-06-10 17:15:42 +02:00
samhed b88b27e378 Update vnc_auto after the screen namechange
Commit 553864e85813f886b9c60b4825c8d4b714cae695 changed the name of
noVNC_screen to noVNC_container, vnc_auto.html was not updated
accordingly. Fixes #621
2016-06-08 16:02:37 +02:00
samhed d6b88ea7ac Add support for fences
We don't actually use these, but servers may require this for other
features.
2016-06-03 16:37:19 +02:00
samhed 6ad67e3f83 Lower level check for framebuffer update requests
Try to avoid using helper functions with complex logic when verifying
results as those helper functions are also something we want to verify.

Also add a test for a mix of clean and dirty areas specifically to make
sure that helper function behaves properly.
2016-06-03 16:35:59 +02:00
samhed 7f2867eef6 Always flush socket after each message
Make sure our messages go away right away, rather than having to
remember to call flush from the caller, or causing extra delays by
waiting for the send timer. This should result in a more responsive
system.
2016-06-03 16:32:28 +02:00
samhed 32da983a39 Fix 'sent' assertion
We were completely mishandling the length of the data. Make sure
we look at the length of the websocket rather than the websock object,
and also compare with the expected length.
2016-06-03 16:31:29 +02:00
samhed c74482cc9b Fix typo in pointer event test 2016-06-03 16:31:12 +02:00
samhed 05ce666c4c Avoid unnecessary delays
We only use setTimeout() to avoid hanging the browser, not because we
actually want a delay. So let's use the smallest delay there is.
2016-06-03 10:55:42 +02:00
samhed aeffd56ea0 Clean up encodings array
List pseudo-encodings seperately and sorted by encoding number.
2016-06-03 10:55:42 +02:00
samhed 6cef4000e9 Merge branch 'ui-cleanup' of https://github.com/kanaka/noVNC 2016-06-03 10:46:05 +02:00
Samuel 64244af2ce Split the setDesktopSize function (#618)
In order to follow the surrounding coding-standards, the
setDesktopSize client message is split from the public function which
now is called requestDesktopSize().
2016-06-02 22:37:52 +02:00
Samuel Mannehed 4f80e14e64 Consistent closing tags for void elements 2016-05-27 16:14:25 +02:00
Samuel Mannehed d130e93ff8 Use a consistent naming convention for elements
* Element names we use "_" as word-delimiter, not "-"
* Element names use less camel-case
* Element names end with the type
* Element names always start with noVNC_
2016-05-27 16:14:25 +02:00
Samuel Mannehed a75fef73b4 Change the names of settings-elements
This change was made in order to make it easier to distinguish
settings-elements from other elements. One example of the problem
that was solved is the two elements "noVNC_clip" and
"noVNC_clipboard" where the first is the setting for clipping mode.
That element was now renamed to "noVNC_setting_clip".
2016-05-27 16:12:32 +02:00
samhed 41ff2571e9 Timeouts should always use anonymous functions
While you CAN pass functions in strings, it is not the correct way
of doing it. The browsers are just being nice.
2016-05-27 16:12:31 +02:00
samhed 0f96b33dd1 Change name of clipboard functions
There were a high risk of confusion between clipboard functions and
clipping functions.
2016-05-27 16:11:47 +02:00
samhed 6f388df065 Group together related functions and add dividers
Dividers between the different parts of the UI has been added in
order to easier get an overview.
2016-05-12 16:56:50 +02:00
samhed 69e9dc0d55 Send the xvp keys from anonymous functions 2016-05-12 16:56:50 +02:00
samhed 575503d012 Renamed and moved keyboard and mouse functions 2016-05-12 16:56:50 +02:00
samhed d0ee767a68 Renamed and moved updateXvpButton 2016-05-12 16:56:50 +02:00
samhed 4f0ad13a84 Move the connect and disconnect functions 2016-05-12 16:56:50 +02:00