MCPcopy Create free account
hub / github.com/apache/cloudstack / _sendMouse

Method _sendMouse

systemvm/agent/noVNC/core/rfb.js:1363–1381  ·  view source on GitHub ↗
(x, y, mask)

Source from the content-addressed store, hash-verified

1361 }
1362
1363 _sendMouse(x, y, mask) {
1364 if (this._rfbConnectionState !== 'connected') { return; }
1365 if (this._viewOnly) { return; } // View only, skip mouse events
1366
1367 // Highest bit in mask is never sent to the server
1368 if (mask & 0x8000) {
1369 throw new Error("Illegal mouse button mask (mask: " + mask + ")");
1370 }
1371
1372 let extendedMouseButtons = mask & 0x7f80;
1373
1374 if (this._extendedPointerEventSupported && extendedMouseButtons) {
1375 RFB.messages.extendedPointerEvent(this._sock, this._display.absX(x),
1376 this._display.absY(y), mask);
1377 } else {
1378 RFB.messages.pointerEvent(this._sock, this._display.absX(x),
1379 this._display.absY(y), mask);
1380 }
1381 }
1382
1383 _handleWheel(ev) {
1384 if (this._rfbConnectionState !== 'connected') { return; }

Callers 5

_handleMouseMethod · 0.95
_handleMouseButtonMethod · 0.95
_handleMouseMoveMethod · 0.95
_flushMouseMoveTimerMethod · 0.95

Calls 2

absXMethod · 0.80
absYMethod · 0.80

Tested by

no test coverage detected