VirtualBox

Changeset 30432 in vbox


Ignore:
Timestamp:
Jun 24, 2010 1:06:21 PM (15 years ago)
Author:
vboxsync
Message:

X11 additions/mouse: fixed a bug introduced with r56116 plus prevent sending a motion event if only a mouse button was pressed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c

    r28800 r30432  
    7272        &&  RT_SUCCESS(VbglR3GetMouseStatus(&fFeatures, &cx, &cy))
    7373        && (fFeatures & VMMDEV_MOUSE_HOST_CAN_ABSOLUTE))
     74    {
    7475#if ABI_XINPUT_VERSION == SET_ABI_VERSION(2, 0)
    7576        /* Bug in the 1.4 X server series - conversion_proc was no longer
     
    7879        cy = (cy * screenInfo.screens[0]->height) / 65535;
    7980#endif
    80         /* send absolute movement */
    81         xf86PostMotionEvent(pInfo->dev, 1, 0, 2, cx, cy);
     81        /* The X server is calling this function even if only a button was
     82         * pressed. old_x/old_y seem to be not used by the server code. */
     83        if (   (uint32_t)pInfo->old_x != cx
     84            || (uint32_t)pInfo->old_y != cy)
     85        {
     86            /* send absolute movement */
     87            xf86PostMotionEvent(pInfo->dev, 1, 0, 2, cx, cy);
     88            pInfo->old_x = cx;
     89            pInfo->old_y = cy;
     90        }
     91    }
    8292}
    8393
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