Pierre Ossman
4fda2526f4
Send combination keysyms for some Japanese keys
...
Windows doesn't give us stable symbols for a bunch of Japanese IM keys,
instead alternating between two symbols. This state is not synchronised
with the IM running on the remote server so to have stable behaviour we
have to collapse these multiple symbols in to a single keysym.
2021-03-29 12:50:22 +03:00
Pierre Ossman
102257cb32
Fix typo for ZenkakuHankaku key
2021-03-29 12:50:16 +03:00
Pierre Ossman
77509c1e56
Use toggle keysym for Eisu key
...
This matches how the key behaves on a Linux system.
2021-03-29 12:50:12 +03:00
Pierre Ossman
9e0a5d26af
Update keycode mappings to latest version
...
This update fixes Korean layouts.
2021-03-29 12:48:56 +03:00
Pierre Ossman
8b8201fd73
Remove Firefox Alt workaround
...
The bug got fixed way back in Firefox 63, and it is also misbehaving
with modern Firefox as they no longer consider AltGr an Alt-key.
2021-03-29 12:48:02 +03:00
Pierre Ossman
33a113a475
Handle empty rects in RAW decoder as well
...
It was overlooked in the previous commit because we couldn't feed
empty data messages through the test framework.
2021-03-29 12:47:49 +03:00
Pierre Ossman
073737c8ac
Handle empty rects from the server
...
These are very pointless for the server to send, but not a violation of
the protocol so we need to be able to handle them. We've seen this
happen in real world scenarios a few times.
2021-03-29 12:47:30 +03:00
Pierre Ossman
7412dde8ee
Handle quick Cursor detach after mouse up
...
This timer might fire after the Cursor object has detached from a DOM
element, causing crashes. This will likely not happen in real scenarios,
but the tests are quick enough to trigger this.
2021-03-29 12:44:25 +03:00
Pierre Ossman
d5b84d9185
Avoid fractional pixel sizes from Display
2021-03-29 12:41:06 +03:00
Pierre Ossman
ae1bc396bf
Standardise on a single blit function
...
Keep everything simpler by always blitting in the same pixel format.
It's up to the decoders to convert if they need to.
2021-03-29 12:39:31 +03:00
Pierre Ossman
c7a7ce70be
Fix bad BasicCompression check in Tight decoder
2021-03-29 12:37:29 +03:00
Pierre Ossman
212e0f1a10
Move tile handling to Hextile decoder
...
It is only used there so no need for it to be in the general
Display class.
2021-03-29 12:36:23 +03:00
Samuel Mannehed
69b945fc87
Standardize on camelCase in Display
2021-03-29 12:35:23 +03:00
Samuel Mannehed
b837bd6f59
Add camelCase rule to eslint
2021-03-29 12:34:42 +03:00
Samuel Mannehed
670eefbc97
Standardize on camelCase in Base64
2021-03-29 12:34:31 +03:00
Samuel Mannehed
b2d8db3f7b
Standardize on camelCase in Decoders
2021-03-29 12:34:29 +03:00
Samuel Mannehed
a3e2b1e46e
Standardize on camelCase in Logging
2021-03-29 12:34:25 +03:00
Samuel Mannehed
472ede66ea
Standardize on camelCase in Websock
2021-03-29 12:34:23 +03:00
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)
2021-03-29 12:27:54 +03:00
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
2021-03-29 12:26:12 +03:00
Samuel Mannehed
8a8fa1d906
Stop send mouse clicks while dragging in view only
2021-03-29 12:23:20 +03:00
Samuel Mannehed
5a81223d96
Standardize on camelCase for functions in RFB
2021-03-29 12:23:12 +03:00
Samuel Mannehed
eff38d47f9
Standardize on camelCase for variables in RFB
2021-03-29 12:21:50 +03:00
Samuel Mannehed
1de3769fd3
Remove unused mouse_arr variable
2021-03-29 12:16:38 +03:00
Samuel Mannehed
d420aa6413
Shorten rows to max 80 chars in mouse.js
2021-03-29 12:15:56 +03:00
Samuel Mannehed
93e42772bc
Fix wording in comment
2021-03-29 12:15:49 +03:00
Uwe Klatt
9098478faf
Limit mouse move events to one every 17 ms
2021-03-29 12:15:39 +03:00
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
2021-03-29 12:14:55 +03:00
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.
2021-03-29 12:14:19 +03:00
Niko Lehto
8be81165bd
Add extended clipboard Pseudo-Encoding
...
Add extended clipboard pseudo-encoding to allow the use of unicode
characters in the clipboard.
2021-03-29 12:13:59 +03:00
Niko Lehto
581fe511ad
Fix bug where inflate would read too much data
2021-03-29 12:09:44 +03:00
Niko Lehto
9ca647667b
Split api of inflate
...
Added ability to read data chunk wise.
2021-03-29 12:09:40 +03:00
Niko Lehto
dbe2930758
Handle errors from zlib/pako
2021-03-29 12:09:36 +03:00
Niko Lehto
b690ae4c2d
Move error handling to Inflate class
...
Every call wants this check so this should be done inside the class.
2021-03-29 12:09:32 +03:00
Niko Lehto
5e4544d5fc
Add missing copyright header for Inflator.js
2021-03-29 12:09:27 +03:00
Niko Lehto
0b19961b06
Remove unused inflate argument
...
The value true was an invalid flush argument so it was in practice
unused.
2021-03-29 12:09:21 +03:00
Niko Lehto
286694869b
Add util for unsigned and signed int. conversion
...
Will be used in later commit in extended clipboard handling.
2021-03-29 12:09:10 +03:00
Niko Lehto
fdeefcfab4
Add deflator helper class for deflating data
...
Wraps pako's deflate for easier usage.
2021-03-29 12:09:05 +03:00
Samuel Mannehed
c1160d1468
Fix color channels for VMware alpha cursors
...
The red and blue channels were incorrectly swapped.
2021-03-29 12:08:36 +03:00
Juanjo Diaz
1c38b6f120
Remove generated HTML by Cursor when it detaches
2021-03-29 12:08:01 +03:00
Samuel Mannehed
2f43cead79
Add comment for browser and platform detection
2021-03-29 12:07:32 +03:00
Samuel Mannehed
e7a5aa271e
Add short description at the top of browser.js
2021-03-29 12:07:23 +03:00
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.
2021-03-29 12:07:09 +03:00
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.
2021-03-29 12:06:42 +03:00
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.
2021-03-29 12:06:28 +03:00
Samuel Mannehed
ce94d92e18
Build in the behavior to ignore decodeUTF8 errors
...
Makes the code clearer and more explicit in intent.
2021-03-29 12:03:54 +03:00
Chris \"Koying\" Browet
c0276776e9
Add support for Unix Tight auth
2021-03-29 12:02:05 +03:00
VanyM
10f4aa9e7b
Add try catch in every place that uses decodeUTF8
2021-03-29 12:02:00 +03:00
Samuel Mannehed
b2dc76ee18
Add encodeUTF8 function to core/util/strings.js
2021-03-29 12:01:15 +03:00
Pierre Ossman
12cdad066e
Make Cursor.detach() safe to call when not attached
...
Avoids having checks in higher layers.
2021-03-29 12:01:10 +03:00