Mouse issues on Windows 10 guest

This is for discussing general topics about how to use VirtualBox.
Skilly
Posts: 9
Joined: 21. May 2014, 21:28

Re: Mouse issues on Windows 10 guest

Post by Skilly »

Hi, all, I wanted to report that I have the same issue and that it was introduced in 6.1.40. It is still present in 7.0.2 but it is not present in 6.1.38. I diff'ed the 6.1.38 and 6.1.40 source code and found a change on line 661 of src/VBox/Main/src-client/MouseImpl.cpp that seems that it might be relevant:

Code: Select all

        rc = i_reportRelEventToMouseDev(cJiggle, 0, dz, dw, fButtons);

        /* Since VMMDev does not deal with mouse buttons state, also
         * send relative or absolute pointing event to emulated mouse
         * device once it supports it.
         *
         * Relative pointing events are sent to: PS/2 Mouse, USB Mouse,
         * combination of both (PS/2 and USB Mouse).
         *
         * Absolute ones to: USB Tablet, USB Multi-Touch Tablet,
         * USB MT TouchScreen and TouchPad.
         *
         * IMPORTANT: Avoid sending relative event to devices which can
         * do both relative and absolute pointing since it will result
         * in misbehavior. */
        if (!i_deviceCanAbs())
            rc = i_reportRelEventToMouseDev(cJiggle, 0, dz, dw, fButtons);
        else
            rc = i_reportAbsEventToMouseDev(x, y, dz, dw, fButtons);
It seems to report the relative event twice which seems to cause hovering and dragging to not work properly. I'm not yet familiar with how to submit fixes to get this patched; I'll start looking for it.
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Mouse issues on Windows 10 guest

Post by fth0 »

You're probably right in that this change is relevant, but it's the other way around IMHO:

In the new multi-line comment, note the "IMPORTANT:" paragraph. AFAIU, the source code line before the comment block was meant to be replaced by the if-else-construct after the comment block. Keeping the old line clearly violates the comment, and they cannot both be correct. ;)

Thanks for offering a fix, but don't bother, because it has allegedly been fixed already. :)
Skilly
Posts: 9
Joined: 21. May 2014, 21:28

Re: Mouse issues on Windows 10 guest

Post by Skilly »

fth0 wrote:In the new multi-line comment, note the "IMPORTANT:" paragraph. AFAIU, the source code line before the comment block was meant to be replaced by the if-else-construct after the comment block. Keeping the old line clearly violates the comment, and they cannot both be correct.
That was also my understanding.
fth0 wrote:Thanks for offering a fix, but don't bother, because it has allegedly been fixed already.
That works for me! Thanks!
ingbs2001
Posts: 2
Joined: 13. Oct 2022, 12:33

Re: Mouse issues on Windows 10 guest

Post by ingbs2001 »

VMBroken1111 wrote:Made a account as I have had help from here in the past and wanted to pay it forward.

I had the same issue, didnt end up looking too deep into this, but seemingly a issue with nvidia driver on linux.

A work around that effectively sorted the issue for is setting pointer to PS/2
By setting the pointer to PS / 2, the mouse is usable correctly.
Many thanks
ziolkowskib
Posts: 1
Joined: 21. Nov 2022, 23:20

Re: Mouse issues on Windows 10 guest

Post by ziolkowskib »

VMBroken1111 wrote:Made a account as I have had help from here in the past and wanted to pay it forward.

I had the same issue, didnt end up looking too deep into this, but seemingly a issue with nvidia driver on linux.

A work around that effectively sorted the issue for is setting pointer to PS/2
Switching the pointer to PS/2 solved the issue also in my case - thank you so much!
Post Reply