]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Allow cursor to be updated while connecting
authorPierre Ossman <ossman@cendio.se>
Mon, 30 Dec 2019 08:30:00 +0000 (09:30 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 30 Dec 2019 08:30:00 +0000 (09:30 +0100)
We haven't got a server provided cursor at this point, but we might
have done something local, e.g. enabled the dot cursor.

core/rfb.js

index 6f717bd5ace7049eee6ec93e8521caddeb6193ae..e3e3a0f79e9a4d1b1af5874f01921904261c9528 100644 (file)
@@ -1875,7 +1875,10 @@ export default class RFB extends EventTargetMixin {
     }
 
     _refreshCursor() {
-        if (this._rfb_connection_state !== 'connected') { return; }
+        if (this._rfb_connection_state !== "connecting" &&
+            this._rfb_connection_state !== "connected") {
+            return;
+        }
         const image = this._shouldShowDotCursor() ? RFB.cursors.dot : this._cursorImage;
         this._cursor.change(image.rgbaPixels,
                             image.hotx, image.hoty,