Pierre Ossman
111225fa41
Split decoder tests to separate files
2020-06-08 07:46:42 +02:00
Pierre Ossman
224f95f997
Move tile handling to Hextile decoder
...
It is only used there so no need for it to be in the general
Display class.
2020-06-06 13:23:05 +02:00
Pierre Ossman
f694c32fd5
Merge branch 'camelcase' of https://github.com/samhed/noVNC
2020-06-05 09:41:25 +02:00
Samuel Mannehed
cfb824ed03
Add camelCase rule to eslint
2020-05-31 23:37:29 +02:00
Samuel Mannehed
a7fe079f81
Standardize on camelCase in Logging
2020-05-31 23:37:29 +02:00
Samuel Mannehed
ea858bfa27
Standardize on camelCase in Websock
2020-05-31 23:21:35 +02:00
Samuel Mannehed
5d570207f7
Standardize on camelCase in Display
2020-05-31 23:21:35 +02:00
Samuel Mannehed
95632e413d
Standardize on camelCase in tests
2020-05-31 23:21:35 +02:00
Samuel Mannehed
80187d158c
Standardize on camelCase in RFB
2020-05-31 23:21:35 +02:00
Samuel Mannehed
dff4fefa3c
Remove unused properties and variables
...
The code that used these were removed in the following commits:
* 9ff86fb718
(RFB._mouse_arr)
* bb6965f2e6
(old_requestAnimationFrame)
* 490d471c53
(Display._c_forceCanvas)
2020-05-31 22:49:41 +02:00
Samuel Mannehed
150596be83
Properly limit mouse moves to once every 17 ms
...
Previous attempt in c958269
had a number of issues, this is a full
rewrite, complete with improved unit tests.
Fixes github issue #1402
2020-05-31 00:53:15 +02:00
Samuel Mannehed
11a22dbf0c
Stop send mouse clicks while dragging in view only
2020-05-31 00:53:15 +02:00
Samuel Mannehed
006743857b
Standardize on camelCase for functions in RFB
2020-05-31 00:53:15 +02:00
Samuel Mannehed
e7dec5270e
Standardize on camelCase for variables in RFB
2020-05-31 00:53:15 +02:00
Samuel Mannehed
479d8cefd1
Add ability to set compression level
...
Fixes github issue #1382 .
2020-05-01 20:47:36 +02:00
Samuel Mannehed
a672168d4d
Add unit tests for mouse move limit
2020-05-01 20:37:48 +02:00
Andrey Trebler
efd1f8a4f2
adds qualityLevel property to RFB class for updating JPEG quality level encoding on the fly
2020-02-28 13:14:19 +01:00
Alex Tanskanen
ceb8ef4ec1
Fix crash with too large clipboard data
...
If too much text is copied in the session, String.fromCharCode.apply()
would crash in Safari on macOS and Chrome on Linux. This commit fixes
this issue by avoiding apply() altogether. Also added test to cover this
issue.
2020-02-21 09:39:31 +01:00
Pierre Ossman
384232fb56
Merge branch 'clipboard_unicode' of https://github.com/CendioNiko/noVNC
2020-02-18 09:46:10 +01:00
Niko Lehto
f73fdc3ed3
Add extended clipboard Pseudo-Encoding
...
Add extended clipboard pseudo-encoding to allow the use of unicode
characters in the clipboard.
2020-02-18 09:32:36 +01:00
Niko Lehto
9575ded8da
Add util for unsigned and signed int. conversion
...
Will be used in later commit in extended clipboard handling.
2020-02-17 11:29:40 +01:00
Niko Lehto
f52e979082
Add deflator helper class for deflating data
...
Wraps pako's deflate for easier usage.
2020-02-17 11:29:29 +01:00
Niko Lehto
3b562e8a0f
Make clipBoardPasteFrom() test more specific
...
Don't rely on clientCutText() to test clipboardPasteFrom().
2020-02-17 09:34:44 +01:00
Samuel Mannehed
71bb3fdfa5
Fix color channels for VMware alpha cursors
...
The red and blue channels were incorrectly swapped.
2020-01-30 11:48:17 +01:00
Pierre Ossman
eb05b45b70
Make afterEach() hooks work when skipping tests
...
Mocha will now run afterEach() hooks when tests are skipped, so we need
to make them more robust against things being partially set up.
2020-01-23 14:27:37 +01:00
Samuel Mannehed
64fdd336a0
Simplify encodeUTF8/decodeUTF8 unittests
2020-01-03 10:41:34 +01:00
Samuel Mannehed
80c72e92d2
Add unit tests for encodeUTF8 and decodeUTF8
2020-01-02 17:29:41 +01:00
Pierre Ossman
c4eb4ddcfe
Handle slow loading of images
...
Internet Explorer seems to flag images as loaded prematurely, which
can result in rendering bugs. We can detect this by looking at the
dimensions though.
2019-12-23 15:52:54 +01:00
Alex Tanskanen
a6304f91d0
Fix missing caps lock events on iOS
...
Caps Lock on iOS only trigged key release or key press events.
When it's clicked it would only send keydown, and next time
it would only send keyup and so on. It should send both a key press
and a key release.
Also added the unit tests for macOS since those were missing.
Co-Authored-By: Alex Tanskanen <aleta@cendio.se>
2019-11-07 16:44:26 +01:00
Pierre Ossman
ccb511a527
Handle missing Shift events on Windows
...
This is a bug in the OS that leaks through to the browsers. We need
to fake a Shift release here to avoid Shift getting stuck in the remote
session.
2019-11-04 10:17:45 +01:00
Pierre Ossman
3388c92c7f
Send NumLock on macOS, even though the key is Clear
...
There is no obvious choice what works best here, but this is what
TigerVNC has been doing for years without complaints. Let's follow
them until we get reports that this doesn't work well.
2019-11-01 13:13:35 +01:00
Pierre Ossman
5736ea0bd5
Fix AltGr for a few more keys in IE and Edge
...
Some keys apparently send 'Unidentified' rather than an unshifted value.
Make sure those are also handled. Examples are \ and | on a Swedish
keyboard.
2019-11-01 09:59:02 +01:00
Pierre Ossman
8c51e9a8a2
Revert iOS keyup workaround
...
It seems Apple has fixed their buggy keyup events, so remove the
workaround and allow keys to be kept pressed again.
This is a revert of 9e99ce126c
.
2019-10-31 15:36:40 +01:00
Pierre Ossman
9d956e9198
Handle broken numpad delete key in Chrome
2019-10-31 14:51:36 +01:00
Pierre Ossman
758399050d
Try to handle Meta key properly
...
The standards have unfortunatly caused some confusion between the Windows
key and the original Meta key. Try to handle the common case sanely at least.
2019-10-31 14:12:58 +01:00
Samuel Mannehed
3055307d3d
Merge pull request #1299 from CendioNiko/vmwarecursor
...
Add support for VMware cursor encoding
2019-09-25 14:45:29 +02:00
Samuel Mannehed
8dc47f3c06
Merge pull request #1289 from CendioNiko/master
...
Desktop name improvements
2019-09-25 14:43:55 +02:00
Samuel Mannehed
c51a77c2eb
Merge pull request #1281 from jalfd/optimize-receive-buffer
...
Optimize receive buffer
2019-09-25 13:26:02 +02:00
Niko Lehto
296ba51f49
Add support for VMware cursor encoding
...
Supports both classic cursor type and alpha cursor type. In classic
mode the server can send 'inverted' pixels for the cursor, our code
does not support this but handles these pixels as opaque black.
Co-authored-by: Samuel Mannehed <samuel@cendio.se>
2019-09-24 10:26:30 +02:00
Niko Lehto
8d6f686b59
Test unicode desktop names
2019-09-04 14:47:40 +02:00
Niko Lehto
ce66b46986
Add support for DesktopName extension
...
This extension allows session name to be changed during runtime.
2019-09-04 14:23:37 +02:00
Pierre Ossman
9886d5951d
Set viewport size for autoscale tests
...
We were incorrectly relying on the viewport being indirectly set
for us. Make sure we are explicit in what we want for these tests.
2019-08-23 15:48:30 +02:00
Pierre Ossman
30ff15a35a
Merge branch 'upgrade' of https://github.com/CendioOssman/noVNC
2019-08-23 15:08:56 +02:00
Pierre Ossman
e5255fc246
Remove pointless Display.clear()
...
It served no meaningful purpose and it had bugs. So let's remove it
rather than try to fix it.
2019-08-23 15:05:58 +02:00
Pierre Ossman
3855a7bee4
Remove unused Display.logo attribute
2019-08-23 15:04:23 +02:00
Jesper Alf Dam
7d755d10dc
Don't compact the receive buffer unless we've actually run out of space
...
Previously, we would compact the buffer (moving unread data to the
start of the buffer) as follows:
- after processing a message, if there are zero unread bytes, just reset
the indices for first and last unread byte to zero
- else, if at least 1/8th of the buffer is used, copy remaining data to the beginning of the buffer
The second option is never actually necessary, as before inserting new data
into the array, we already check if there's enough free space, and
compact the buffer first if necessary. So we've been doing a lot of
copies that weren't actually needed. Let's not do that any more.
2019-08-16 19:34:09 +02:00
Pierre Ossman
c9765e5066
Upgrade to latest sinon and chai
2019-08-15 15:58:09 +02:00
Pierre Ossman
b875486db8
Avoid deprecated called.once from sinon-chai
...
It's been removed in newer versions and will break eventually.
2019-08-15 15:58:09 +02:00
Pierre Ossman
dcc41bde61
Fix up errors and warnings in vnc_playback.html
...
Remove the styling, as it isn't really needed, and fix some minor
things that the w3c validator complains about.
2019-03-26 15:21:31 +01:00
Juanjo Diaz
1c9b904d1a
Remove callbacks from UI in favour of promises
2019-02-27 10:18:59 +02:00