Commit Graph

445 Commits

Author SHA1 Message Date
Samuel Mannehed
749ddce5b9 Add unit tests for mouse move limit 2021-03-29 12:16:01 +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
Samuel Mannehed
4710ec1822 Fix indentation for focus check 2021-03-29 12:15:34 +03:00
Samuel Mannehed
02b9b268ff Don't fade the control bar if it has focus
Fixes github issue #1369
2021-03-29 12:15:29 +03:00
Samuel Mannehed
a015e33111 Hide the clipboard when not connected
Fixes github issue #1367.
2021-03-29 12:15:25 +03:00
Ingo Blechschmidt
950d871b0e Document default setting of focusOnClick 2021-03-29 12:15:19 +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
95af51e28d Fix focus problem after closing the toolbar
Closing the toolbar would make the focus remain on the toolbar and
not in the session. The only way to switch focus was to click in the
session. This commit will automatically switch back focus to the session
after closing the toolbar.
2021-03-29 12:14:49 +03:00
Niko Lehto
64dfb8d1d6 Hide clipboard side bar button when view only mode
The clipboard side bar button serves no purpose if user uses 'View Only'
mode, this commit hides this button in those instances.
2021-03-29 12:14:25 +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
Pierre Ossman
888f24e7af Style all input types for consistent UI
At least all that the browsers will let us.
2021-03-29 12:14:14 +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
509b5795a0 Export constants in inflate.js for easier usage 2021-03-29 12:09:49 +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
Niko Lehto
24cf1f0f9a Make clipBoardPasteFrom() test more specific
Don't rely on clientCutText() to test clipboardPasteFrom().
2021-03-29 12:08:58 +03:00
Alvin Townsend
d01f6e6d27 Correcting path to package.json for running at a path other than root. 2021-03-29 12:08:52 +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
70dd0058ac Simplify encodeUTF8/decodeUTF8 unittests 2021-03-29 12:07:57 +03:00
Samuel Mannehed
a4c5c38b53 Add unit tests for encodeUTF8 and decodeUTF8 2021-03-29 12:07:52 +03:00
Samuel Mannehed
789308212b Remove unused python scripts 2021-03-29 12:07:48 +03:00
Samuel Mannehed
ce5fe304cb Fix chinese translation for "Disconnect"
Thanks for @wavezhang, @litongjava, and @bhzhu203 for helping out.
2021-03-29 12:07:41 +03:00
Samuel Mannehed
781075c841 Update chinese translation strings
Thanks to @QQ2017 and @wavezhang for helping out with correcting these.
2021-03-29 12:07:36 +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
Samuel Mannehed
c3ef9ff557 Peter is no longer part of the noVNC team 2021-03-29 12:02:16 +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
Samuel Mannehed
a850be4afa Fix chinese translation errors
Thanks to @QQ2017 for providing the translation strings
2021-03-29 12:01:07 +03:00
Samuel Mannehed
354d544843 Simplify logic for status hierarchy
Removes unnecessary variable
2021-03-29 12:01:02 +03:00
Samuel Mannehed
0bf9403a36 Ensure warning status timeouts are honored
When showing a new status popup we want to set a timer for how long to
show it. In cases where we show many statuses in a fast succession we
need to remove any running timeouts when showing a new one.

There are exceptions when new statuses won't be shown, and thats if a
more severe status is already showing, i.e and error or a warning.

Warnings can still have timeouts. There was a bug that occured when we
tried to show a normal status while a warning was showing. The bug
caused the warning status timeout to be removed even if the normal
status was never shown. We should only remove running timeouts if we're
actually going to show a new status.
2021-03-29 12:00:47 +03:00
Pierre Ossman
29db8997ec Don't use arrow functions in legacy loader
The browsers that need the legacy code do not support such fancy
modern things.
2021-03-29 12:00:38 +03:00
Pierre Ossman
46f15667f7 Load support scripts first
E.g. SystemJS requires the Promise polyfill, so make sure all our
support files are loaded first.
2021-03-29 11:59:59 +03:00
Pierre Ossman
edb5fee88b Upgrade to latest babel
There has been a lot of renaming and restructuring in babel, so we need
to modify our code to handle the latest version. We also need to adjust
the way we build our babel worker as babel itself no longer runs in older
browsers such as Internet Explorer.
2021-03-29 11:59:50 +03:00
Pierre Ossman
23871b42d1 Always include Promise polyfill for legacy browsers
It is now used by our general code and not just by the conversion
routines, so we need to make sure it is always included for the
old browsers.
2021-03-29 11:58:26 +03:00