> On Mon, Jul 17, 2023 at 10:59:36AM +0800, Shiyuan Gao wrote:
> > When only use PS/2 mouse without usb-tablet, the mouse pointer of the
> > guest on the VNC will work badly that the cursor of VNC is inconsistent
> > with the mouse pointer of guest.
> >
> > The reason is the PS/2 mouse use relative coordinates and we can't know
> > the initial position of the guest mouse pointer.
> >
> > So move the guest mouse pointer to (0, 0) of the screen when connect the
> > VNC, and then move the mouse pointer to the cursor of VNC(absolute
> > coordinates are also relative coordinates).
>
> This is not a solution, because even if you know the starting position
> of the pointer, the host/guest pointers can have different motion
> acceleration behaviour, so they'll loose sync with each other. You'll
> have problems such as the host pointer exiting the VNC window before
> the guest pointer has got to the far edge.

Maybe they will loose sync with each other again. On windows VM such as win10,
disable "Enhance Pointer Precision" Option in "Pointer Options"
(Control Panel -> Mouse), I can't found this problem.

>
> Trying to make a relative pointer work correctly in combination with
> absolute input events from VNC is never going to work.
>
>
> This is why QEMU created a VNC extension to allows switching the VNC
> protocol from absolute to relative pointer motion events.
>
>
> If you need to run a VM with only the PS/2 pointer, then you need
> to be using a client that supports this extension:
>
>
> https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#qemu-pointer-motion-change-pseudo-encoding
>  
> <https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#qemu-pointer-motion-change-pseudo-encoding>
>

Thanks a lot, I will read it for more info.

Reply via email to