VirtualBox

Changeset 20988 in vbox for trunk/src


Ignore:
Timestamp:
Jun 26, 2009 4:43:16 PM (15 years ago)
Author:
vboxsync
Message:

Main/MouseImpl: fix unwanted empty mouse movement events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MouseImpl.cpp

    r19654 r20988  
    301301     * Send the absolute mouse position to the VMM device.
    302302     */
    303     int vrc = mParent->getVMMDev()->getVMMDevPort()
    304         ->pfnSetAbsoluteMouse(mParent->getVMMDev()->getVMMDevPort(),
    305                               mouseXAbs, mouseYAbs);
    306     ComAssertRCRet (vrc, E_FAIL);
     303    int vrc = 0;
     304    if ((mLastAbsX != mouseXAbs) || (mLastAbsY != mouseYAbs))
     305    {
     306        vrc = mParent->getVMMDev()->getVMMDevPort()
     307                  ->pfnSetAbsoluteMouse(mParent->getVMMDev()->getVMMDevPort(),
     308                                        mouseXAbs, mouseYAbs);
     309        ComAssertRCRet (vrc, E_FAIL);
     310    }
    307311
    308312    // Check if the guest actually wants absolute mouse positions.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette