Samuel Mannehed [Mon, 29 Aug 2016 12:46:58 +0000 (14:46 +0200)]
Add a separate dialog for the password prompt
The user might be queried for the password during the connect stage
if no password was previously provided. Add a separate dialog for
this rather than abusing the connect dialog.
samhed [Wed, 24 Aug 2016 16:03:32 +0000 (18:03 +0200)]
Avoid ambigious optional arguments
Some functions weren't obvious what they would do if an argument was
omitted. Split them up in to separate functions in those cases to
make the API clearer.
samhed [Wed, 24 Aug 2016 09:06:23 +0000 (11:06 +0200)]
Strict positioning of panels
The panels were never meant to be positioned relative their container,
so make sure they pop up exactly where we want in the viewport, no
matter where they are in the structure.
Dmitry Sankevich [Wed, 16 Dec 2015 09:35:23 +0000 (15:35 +0600)]
Fix TIGHT negotiation with zero sub-auth types
According to the RFB protocol, when in TIGHT auth negotation,
if the client receives a sub-auth count of zero, it should proceed
as if the `None` sub-auth type had already been selected (and not
send a message selecting that type).
Lars Ole Hurlen [Fri, 11 Mar 2016 07:32:50 +0000 (08:32 +0100)]
Detect RealVNC's RFB 5.0 Protocol Version
The RFB protocol specifies a max version of 3.8, but RealVNC likes to
increment their version when they add new features. RealVNC 5.3 sends
"005.000" as the version string, since they've extended their
implementation upon RFB v3.8. We can detect that, and just tell them we
only speak 3.8, instead of barfing on "005.000" as an invalid version.
Solly Ross [Wed, 14 Sep 2016 17:45:08 +0000 (13:45 -0400)]
Move input-related files into core/input
This commit moves all the input-related files from `core/`
to `core/input/`, and renames a couple as relevant
(input.js --> input/devices.js, keyboard.js --> input/util.js).
Solly Ross [Sat, 3 Sep 2016 18:06:42 +0000 (14:06 -0400)]
Remove unecessary event-related code from Util
The event-related wrapper functions in Util existed mainly for
backwards-compat. However, all currently supported browsers
support the standard functions, so these wrappers are no longer needed.
Solly Ross [Sat, 3 Sep 2016 17:58:32 +0000 (13:58 -0400)]
Util shouldn't modify window object
This commits prevents Util from modifying the window object.
- `window.requestAnimFrame` was removed (no polyfill is needed anymore)
- the potential redefinition of `console.log` and friends was removed
(all supported browsers have `console.xyz` defined anyway)
Solly Ross [Sat, 3 Sep 2016 17:53:47 +0000 (13:53 -0400)]
Switch to PhantomJS 2.x for testing
This commit switches over to use PhantomJS 2.x, bringing in a whole host
of improvements (including `Function#bind`, so we can remove the
`Function#bind` shim in core/util.js).
Solly Ross [Sat, 3 Sep 2016 17:49:55 +0000 (13:49 -0400)]
Don't modify Array prototype
This commit removes our modification of the Array prototype.
It wasn't actually used much in the main code, anyway, and it's a
bad practice to modify built-in prototypes.
Solly Ross [Wed, 14 Sep 2016 17:52:53 +0000 (13:52 -0400)]
Enable noVNC to become Browserifiable
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.
Added a 'QEMUKeyEventDecoder' method to deal with the
key events generated when the QEMU extension is active. Another
method, 'TrackQEMUKeyState', was also created with this same
goal.
Although both methods have similaries with the existing methods
'KeyEventDecoder' and 'TrackKeyState', specially when dealing
with 'supress' and 'releaseall', the logic behind the QEMU extension
does not required keysym generation for most cases (some NumPad keys
are an exception) and, as such, there is no need to treat 'keyPressed'
events and to handle char modifiers.
'TrackQEMUKeyState' also handles a Windows scenario where the
'AltGR' key generates CtrlLeft and AltRight keystrokes. The solution
was to avoid this specific combination to be sent to the VNC server,
discarding the extra 'CtrlLeft' key. Considering that the user can
send CtrlLeft+AltLeft, CtrlRight+AltRight and even CtrlRight+AltLeft,
this workaround to allow Windows users to use AltGR in their noVNC
sessions is worthwhile.
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
In input.js, a new keyboard handler was added to deal exclusively
with the QEMU key event extension. '_onKeyPress()' signature
was changed to allow the same method to treat both cases.
The extension will only be enabled if the browser has support
for the KeyboardEvent.code property.
Changes in rfb.js:
- added a new extension code, QEMUExtendedKeyEvent, value -258.
- handleKeyPress now receives 'keyevent' instead of 'keysym' and
'down'. Both values are retrieved from keyevent as they were
in the previous signature. This method now can send QEMU RFB
extended key messages if the flag was set to 'true'.
- tests/test.rfb.js were changed folowing the onKeyPress() signature
change.
- added a new function to send the QEMU extended key message.
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
samhed [Thu, 2 Jun 2016 14:41:38 +0000 (16:41 +0200)]
Add support for ContinuousUpdates
Instead of requesting frame buffer updates we can, if the server
supports it, continuously recieve frame buffer updates at a rate
determined by the server.
The server can use fencing messages and measure response times to
determine how often it will continue to send updates.
Solly Ross [Wed, 24 Feb 2016 21:13:06 +0000 (16:13 -0500)]
Revert poor workaround for brief Firefox bug
This commit reverts a fix for a bug which briefly occured on certain
nightlies of Firefox. It was never intended to persist in the code
base, and is causing other actual errors to be swallowed.
Solly Ross [Tue, 22 Dec 2015 20:16:52 +0000 (15:16 -0500)]
Fix ImageData Constructor Support Detection
Our support detection for the `ImageData(data, width, height)` constructor
would fail in certain browsers because the size of a 1x1 ImageData's
Uint8ClampedArray is 4, not 1.
nunojusto [Tue, 16 Aug 2016 21:10:14 +0000 (22:10 +0100)]
Update launch.sh
Just a correction of port in use test algoritm.
This way we will not have problems when using port X and having some other service using zyX or any *X port
Solly Ross [Fri, 1 Jul 2016 18:50:30 +0000 (14:50 -0400)]
Fix missing mistyped setTimeout handler in UI
This commit fixes a mistyped setTimeout handler that would result
in the desired function not getting called (due to a missing set
of parentheses). It also removes some uncessary anonymous functions,
and just passes the function objects directly to setTimeout.
Joel Martin [Mon, 13 Jun 2016 15:22:43 +0000 (10:22 -0500)]
Clarify that utils/launch.sh is MPL-2.0
Also, note in the top-level license file that the default noVNC
license for files that are not explicitly marked or mentioned in
the LICENSE.txt file are by default MPL-2.0 licensed.
samhed [Thu, 2 Jun 2016 13:09:00 +0000 (15:09 +0200)]
Always flush socket after each message
Make sure our messages go away right away, rather than having to
remember to call flush from the caller, or causing extra delays by
waiting for the send timer. This should result in a more responsive
system.
samhed [Fri, 3 Jun 2016 12:13:35 +0000 (14:13 +0200)]
Fix 'sent' assertion
We were completely mishandling the length of the data. Make sure
we look at the length of the websocket rather than the websock object,
and also compare with the expected length.
Samuel [Thu, 2 Jun 2016 20:37:52 +0000 (22:37 +0200)]
Split the setDesktopSize function (#618)
In order to follow the surrounding coding-standards, the
setDesktopSize client message is split from the public function which
now is called requestDesktopSize().
Samuel Mannehed [Thu, 26 May 2016 21:15:39 +0000 (23:15 +0200)]
Use a consistent naming convention for elements
* Element names we use "_" as word-delimiter, not "-"
* Element names use less camel-case
* Element names end with the type
* Element names always start with noVNC_
Samuel Mannehed [Sat, 30 Apr 2016 02:35:19 +0000 (04:35 +0200)]
Change the names of settings-elements
This change was made in order to make it easier to distinguish
settings-elements from other elements. One example of the problem
that was solved is the two elements "noVNC_clip" and
"noVNC_clipboard" where the first is the setting for clipping mode.
That element was now renamed to "noVNC_setting_clip".
Now if popupStatus is called twice it will refresh the duration of
the popup. If you want to wait 1.5 seconds and close the popup you
can click the popup itself.