parsec-sdk icon indicating copy to clipboard operation
parsec-sdk copied to clipboard

Cursor Handling Issue

Open faustroxas opened this issue 4 years ago • 2 comments

The cursor is not aligned with the cursor in the Host PC when using a PC which has a scaling of more than 100% https://user-images.githubusercontent.com/63102171/120294942-45e1c000-c2f9-11eb-9bc9-e87b36576707.mov

But when using PC with 100% scaling display setting, the cursor is working as it is supposed to. https://user-images.githubusercontent.com/63102171/120295382-acff7480-c2f9-11eb-8cbe-969bd0c532f8.mp4

Macbooks laptop do not have this setting. So it can't be fixed

faustroxas avatar Jun 01 '21 08:06 faustroxas

I had success multiplying the mouse coordinates by window.devicePixelRatio.

Would look something like this in the web client example code:

parsec.clientSendMessage({
  type: 4,
  relative: !!relative,
  x: x * window.devicePixelRatio,
  y: y * window.devicePixelRatio,
});

jake-leland avatar Jul 20 '21 23:07 jake-leland