(x, y, mask)
| 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; } |
no test coverage detected