fix bug with cursor not displaying on first connect
This commit is contained in:
parent
66355143a9
commit
4a6aa73f6d
|
@ -207,7 +207,7 @@ export default class RFB extends EventTargetMixin {
|
||||||
this._accumulatedWheelDeltaX = 0;
|
this._accumulatedWheelDeltaX = 0;
|
||||||
this._accumulatedWheelDeltaY = 0;
|
this._accumulatedWheelDeltaY = 0;
|
||||||
this.mouseButtonMapper = null;
|
this.mouseButtonMapper = null;
|
||||||
this._mouseLastScreenIndex = 0;
|
this._mouseLastScreenIndex = -1;
|
||||||
|
|
||||||
// Gesture state
|
// Gesture state
|
||||||
this._gestureLastTapTime = null;
|
this._gestureLastTapTime = null;
|
||||||
|
@ -1731,8 +1731,9 @@ export default class RFB extends EventTargetMixin {
|
||||||
// Primary to secondary screen message
|
// Primary to secondary screen message
|
||||||
switch (event.data.eventType) {
|
switch (event.data.eventType) {
|
||||||
case 'updateCursor':
|
case 'updateCursor':
|
||||||
if (event.data.mouseLastScreenIndex === this._display.screenIndex) {
|
if (event.data.mouseLastScreenIndex === this._display.screenIndex || this._mouseLastScreenIndex === -1) {
|
||||||
this._updateCursor(...event.data.args);
|
this._updateCursor(...event.data.args);
|
||||||
|
this._mouseLastScreenIndex = event.data.mouseLastScreenIndex;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'disconnect':
|
case 'disconnect':
|
||||||
|
|
Loading…
Reference in New Issue