Pierre Ossman [Mon, 23 Dec 2019 14:40:17 +0000 (15:40 +0100)]
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.
Samuel Mannehed [Mon, 25 Nov 2019 15:38:03 +0000 (16:38 +0100)]
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.
Pierre Ossman [Mon, 11 Nov 2019 14:46:12 +0000 (15:46 +0100)]
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.
Pierre Ossman [Mon, 11 Nov 2019 12:33:47 +0000 (13:33 +0100)]
Clean up handling of untransformed files
This control flow is difficult enough as it is to follow. Move the
handling of the untransformed files to a separate block to make it
slightly easier to understand.
Alex Tanskanen [Thu, 7 Nov 2019 15:19:08 +0000 (16:19 +0100)]
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.
Pierre Ossman [Fri, 1 Nov 2019 12:13:35 +0000 (13:13 +0100)]
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.
Samuel Mannehed [Thu, 31 Oct 2019 15:24:06 +0000 (16:24 +0100)]
Keep the virtual keyboard after using extra keys
If using the extra keys always gives focus to the screen then an
on-screen keyboard would be closed. When using on-screen keyboards we
instead want to give focus to our virtual keyboard input element.
Pierre Ossman [Thu, 31 Oct 2019 13:07:30 +0000 (14:07 +0100)]
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.
Samuel Mannehed [Fri, 25 Oct 2019 15:44:20 +0000 (17:44 +0200)]
Move focus to the screen when using extra keys
A regression from 2afda54 and friends was that you couldn't use the
extra keys and then directly use the keyboard, you would have to click
in the session first.
This commit restores the correct behavior and also adds a visual queue
to the fact that the screen got the focus by fading the controlbar.
Samuel Mannehed [Mon, 21 Oct 2019 09:27:43 +0000 (11:27 +0200)]
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>
Samuel Mannehed [Mon, 21 Oct 2019 09:26:40 +0000 (11:26 +0200)]
Fix disappearing cursor after click
In the cursor emulation when deciding if the cursor should be hidden -
Instead of checking what's under the cursor, we check the element that
has capture.
This introduced another bug in the cursor emulation. The cursor did not
always disappear properly when using our cursor emulation together with
our setCapture polyfill. More specifically, we saw a problem when a
capture ended on an element without cursor emulation.
We solved this by introducing another visibility check on a timer in
the cursor emulation. However this led to yet another problem where
this timer conflicted with the timer in the setCapture polyfill.
We removed the timeout in the setCapture polyfill and created a
variable to make sure that all the events remaining in the queue can be
completed.
Co-authored-by: Alex Tanskanen <aleta@cendio.se> Co-authored-by: Niko Lehto <nikle@cendio.se>
Samuel Mannehed [Mon, 21 Oct 2019 09:25:01 +0000 (11:25 +0200)]
Check next elem at mouseleave in cursor emulation
It's not obvious that we want to hide the cursor when we get a leave,
it depends on the element that we're leaving to. This makes the code
more robust.
Co-authored-by: Alex Tanskanen <aleta@cendio.se> Co-authored-by: Niko Lehto <nikle@cendio.se>
Pierre Ossman [Mon, 14 Oct 2019 08:15:19 +0000 (10:15 +0200)]
Never show drag icon if clipping is disabled
Toggling the enabled state is a remnant from an earlier version
of the code where we could determine if the the session is actually
clipped, and not just that the setting is enabled.
Right now we only change things based on the setting, so let's
completely hide the button when clipping is disabled.
Pierre Ossman [Fri, 16 Aug 2019 09:18:45 +0000 (11:18 +0200)]
Use "nomodule" instead of manual check
Very few browsers are left in the wild that supports modules but not
"nomodule", so let's simplify our handling a bit.
Safari 10 supports modules but not 'nomodule', this means that this
particular version of Safari will be broken. Due to this we have to
bump up the required Safari version to 11.
Niko Lehto [Tue, 17 Sep 2019 07:28:30 +0000 (09:28 +0200)]
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>
Pierre Ossman [Fri, 23 Aug 2019 11:58:40 +0000 (13:58 +0200)]
Deprecate showDotCursor option for RFB constructor
It is not relevant for the connection stage so it should not have
been a constructor argument to begin with. Ship with a warning for
a release before we remove it.
Pierre Ossman [Fri, 23 Aug 2019 11:57:30 +0000 (13:57 +0200)]
Make sure showDotCursor can be modified before connecting
The cursor object is only attached to our canvas whilst connecting,
so we need to make sure we don't try to update anything when were
not connected or we'll get a crash.