Samuel Mannehed [Wed, 9 Nov 2016 14:54:10 +0000 (15:54 +0100)]
Allow specifying details when calling RFB._fail()
RFB's _fail function logs the error, disconnects the session and sets
disconnect_reason. The disconnect_reason is upon disconnection sent to
the user interface. It is thus not suitable for including error details
that aren't user friendly. The idea is that you will look in the
browser console for a full log with details of the error.
Samuel Mannehed [Tue, 8 Nov 2016 17:18:19 +0000 (18:18 +0100)]
Don't wait for websocket closes on failure
RFB._fail() can be called at any time in any state, it is not certain
that we will get a close event on the socket since the socket might not
be open. This caused us to hit the disconnect timeout in such cases.
Samuel Mannehed [Sat, 5 Nov 2016 17:18:15 +0000 (18:18 +0100)]
Handle errors while opening a Websocket
For example, previously if the user typed in illegal characters in the
port field, no error would be displayed in the interface and the page
would stop at "connecting".
Samuel Mannehed [Thu, 10 Nov 2016 10:57:45 +0000 (11:57 +0100)]
Fix keysyms.fromUnicode() tests
Node.js doesn't handle characters high up in the unicode range
properly with charCodeAt(). Adding a new test for UCS-4 codepoints
using codePointAt() to cover this.
Samuel Mannehed [Wed, 26 Oct 2016 13:43:43 +0000 (15:43 +0200)]
Always disable forced touch gestures
Don't only disable these for the canvas, disable for the entire page.
There were issues where the control bar handle couldn't be moved on
IE and Edge on Microsoft Surface devices due to these "touch-actions".
Pierre Ossman [Thu, 22 Sep 2016 08:28:35 +0000 (10:28 +0200)]
Wait for proper image load event
There is a specific event for when an image has finished loading,
so trigger on that rather than polling. The polling interval of
requestAnimationFrame() can also be very large.
Pierre Ossman [Thu, 22 Sep 2016 08:19:26 +0000 (10:19 +0200)]
Hide image handling in display object
The callers don't need to concern themselves with how images are
rendered, so hide the details behind the API. This also avoids
exposing the render queue.
Pierre Ossman [Fri, 21 Oct 2016 14:02:27 +0000 (16:02 +0200)]
Support standard mouse wheel event
Mouse wheel event handling has now been standardised and has broad
support. Use this event rather than the older, non-standard ones.
At the same time fix up support for horisontal mouse wheel events.
OSLeft/OSRight have been renamed to MetaLeft/MetaRight respectively.
This change will allow the Super/Windows key to be used under the qemu
rfb extension under Chrome and updated browsers.
Samuel Mannehed [Tue, 18 Oct 2016 11:32:00 +0000 (13:32 +0200)]
Add safety check in code for moving the handle
An element that has 'display: none' has a height of zero, and the logic
for the handle assumed that this was never the case. This could cause
the handle to end up at the wrong coordinates.
Samuel Mannehed [Tue, 18 Oct 2016 11:26:17 +0000 (13:26 +0200)]
Move the handle properly when page is scrolled
The coordinates used to calculate the position for the toolbar handle
wrongly took page-offset into account. Util.getPosition was being used
for this. Thus, when page was scrolled, this caused the handle to be
offset when it was being moved. Use getBoundingClientRect instead.
Samuel Mannehed [Sat, 17 Sep 2016 22:52:25 +0000 (00:52 +0200)]
Remove unnecessary substates of disconnected
The states 'loaded', 'failed' and 'fatal' were all variations of the
'disconnected' state. Removing these states allows us to get rid of
many ugly workarounds and special cases. Error messages to the UI can
now instead be delivered via a new onDisconnected callback.
Samuel Mannehed [Fri, 16 Sep 2016 10:12:10 +0000 (12:12 +0200)]
Improve the connection state names
Names such as 'disconnect' and 'disconnected' are inconsistent in the
way that one describes an action and the other a state. The state that
was called 'normal' didn't fit in with the others because the other
names describe a connection state. The new names are: 'disconnecting',
'connecting' and 'connected'