Commit Graph

92 Commits (b837bd6f59c350abbd072f459be06ab2d0e1690d)

Author SHA1 Message Date
Samuel Mannehed b837bd6f59 Add camelCase rule to eslint 4 years ago
Samuel Mannehed 670eefbc97 Standardize on camelCase in Base64 4 years ago
Samuel Mannehed b2d8db3f7b Standardize on camelCase in Decoders 4 years ago
Samuel Mannehed a3e2b1e46e Standardize on camelCase in Logging 4 years ago
Samuel Mannehed 472ede66ea Standardize on camelCase in Websock 4 years ago
Samuel Mannehed 59f5648592 Remove unused properties and variables
The code that used these were removed in the following commits:

* 9ff86fb718477515ede2d6457f06643935d76bcd (RFB._mouse_arr)
* bb6965f2e60c2301dd638383bdc792d1f10af942 (old_requestAnimationFrame)
* 490d471c53b1791398d6c30f0efce54925939f33 (Display._c_forceCanvas)
4 years ago
Samuel Mannehed 19c473f792 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
4 years ago
Samuel Mannehed 8a8fa1d906 Stop send mouse clicks while dragging in view only 4 years ago
Samuel Mannehed 5a81223d96 Standardize on camelCase for functions in RFB 4 years ago
Samuel Mannehed eff38d47f9 Standardize on camelCase for variables in RFB 4 years ago
Samuel Mannehed 1de3769fd3 Remove unused mouse_arr variable 4 years ago
Samuel Mannehed d420aa6413 Shorten rows to max 80 chars in mouse.js 4 years ago
Samuel Mannehed 93e42772bc Fix wording in comment 4 years ago
Uwe Klatt 9098478faf Limit mouse move events to one every 17 ms 4 years ago
Filip Stedronsky 02e7b006de rfb: VeNCrypt Plain SecurityType support
This allows using TigerVNC server with PAM authentication (e.g. agains
LDAP or other extensible authentication mechanisms)

Tested with TigerVNC server (Xvnc -SecurityTypes Plain -PlainUsers '*')

Should not break anything else, this method is tried last when all
other fail.

Tested in Firefox 74 and Chromium 80
4 years ago
Alex Tanskanen b173c8854a 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.
4 years ago
Niko Lehto 8be81165bd Add extended clipboard Pseudo-Encoding
Add extended clipboard pseudo-encoding to allow the use of unicode
characters in the clipboard.
4 years ago
Niko Lehto 581fe511ad Fix bug where inflate would read too much data 4 years ago
Niko Lehto 9ca647667b Split api of inflate
Added ability to read data chunk wise.
4 years ago
Niko Lehto dbe2930758 Handle errors from zlib/pako 4 years ago
Niko Lehto b690ae4c2d Move error handling to Inflate class
Every call wants this check so this should be done inside the class.
4 years ago
Niko Lehto 5e4544d5fc Add missing copyright header for Inflator.js 4 years ago
Niko Lehto 0b19961b06 Remove unused inflate argument
The value true was an invalid flush argument so it was in practice
unused.
4 years ago
Niko Lehto 286694869b Add util for unsigned and signed int. conversion
Will be used in later commit in extended clipboard handling.
4 years ago
Niko Lehto fdeefcfab4 Add deflator helper class for deflating data
Wraps pako's deflate for easier usage.
4 years ago
Samuel Mannehed c1160d1468 Fix color channels for VMware alpha cursors
The red and blue channels were incorrectly swapped.
4 years ago
Juanjo Diaz 1c38b6f120 Remove generated HTML by Cursor when it detaches 4 years ago
Samuel Mannehed 2f43cead79 Add comment for browser and platform detection 4 years ago
Samuel Mannehed e7a5aa271e Add short description at the top of browser.js 4 years ago
Samuel Mannehed ad206180d2 Properly detect scrollbar gutter
As a rule, instead of hard-coding a behavior on specific platforms we
should do dynamic detection.

This commit moves away from always hiding scrollbars on Android and iOS
and instead detects the rendered width of scrollbars in the browser.
4 years ago
Pierre Ossman 89dd199317 Allow cursor to be updated while connecting
We haven't got a server provided cursor at this point, but we might
have done something local, e.g. enabled the dot cursor.
4 years ago
Pierre Ossman 8be70e5ae0 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.
4 years ago
Samuel Mannehed ce94d92e18 Build in the behavior to ignore decodeUTF8 errors
Makes the code clearer and more explicit in intent.
4 years ago
Chris \"Koying\" Browet c0276776e9 Add support for Unix Tight auth 4 years ago
VanyM 10f4aa9e7b Add try catch in every place that uses decodeUTF8 4 years ago
Samuel Mannehed b2dc76ee18 Add encodeUTF8 function to core/util/strings.js 4 years ago
Pierre Ossman 12cdad066e Make Cursor.detach() safe to call when not attached
Avoids having checks in higher layers.
4 years ago
Alex Tanskanen 15c74e7dc9 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>
4 years ago
Alex Tanskanen b5f1a00282 Add "macOS shuffle" to iOS as well
Since iOS functions like macOS with regards to Alt behaving like AltGr,
we need the same workaround on iOS as well.
4 years ago
Pierre Ossman 740a8217ab 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.
4 years ago
Pierre Ossman 796de9653f 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.
4 years ago
Pierre Ossman 6916c83b48 Fix typo for MailSend key 4 years ago
Pierre Ossman d10d7167f6 Update to latest UI Events key specification 4 years ago
Pierre Ossman a8dc933701 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.
4 years ago
Pierre Ossman 62fca18cb9 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 9e99ce126ca8f6f350fa015c0e58d35103c62f7e.
4 years ago
Pierre Ossman dc3ddc8efc Handle broken numpad delete key in Chrome 4 years ago
Pierre Ossman e497b53d09 Explain why Clear maps to KP_Begin 4 years ago
Pierre Ossman 7dc51fa7a5 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.
4 years ago
Samuel Mannehed 6067290169 Rename document.capturedElem to captureElement
To better fit most naming.
4 years ago
Samuel Mannehed 996895268e Hide the emulated cursor when target is null
Makes it easier to understand what happens when a real element isn't
passed as a target to updateVisibility(). Also makes the code more
robust to future changes.

Co-authored-by: Alex Tanskanen <aleta@cendio.se>
Co-authored-by: Niko Lehto <nikle@cendio.se>
4 years ago