VirtualBox

Changeset 22094 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Aug 7, 2009 9:54:52 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50843
Message:

Additions/x11/vboxmouse: don't overwrite mouse status flags we don't change ourselves

File:
1 edited

Legend:

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

    r21868 r22094  
    111111    InputInfoPtr pInfo;
    112112    int rc, xrc;
     113    uint32_t fFeatures = 0;
    113114
    114115    pInfo = device->public.devicePrivate;
     
    132133            break;
    133134        /* Tell the host that we want absolute co-ordinates */
    134         rc = VbglR3SetMouseStatus(  VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE
    135                                   | VMMDEV_MOUSE_GUEST_USES_VMMDEV);
     135        rc = VbglR3GetMouseStatus(&fFeatures, NULL, NULL);
     136        if (RT_SUCCESS(rc))
     137            rc = VbglR3SetMouseStatus(  fFeatures
     138                                      | VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE
     139                                      | VMMDEV_MOUSE_GUEST_USES_VMMDEV);
    136140        if (!RT_SUCCESS(rc)) {
    137141            xf86Msg(X_ERROR, "%s: Failed to switch guest mouse into absolute mode\n",
     
    146150    case DEVICE_OFF:
    147151        xf86Msg(X_INFO, "%s: Off.\n", pInfo->name);
     152        rc = VbglR3GetMouseStatus(&fFeatures, NULL, NULL);
     153        if (RT_SUCCESS(rc))
     154            rc = VbglR3SetMouseStatus(  fFeatures
     155                                      & ~VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE
     156                                      & ~VMMDEV_MOUSE_GUEST_USES_VMMDEV);
    148157        VbglR3SetMouseStatus(0);
    149158        xf86RemoveEnabledDevice(pInfo);
Note: See TracChangeset for help on using the changeset viewer.

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