VirtualBox

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


Ignore:
Timestamp:
Sep 2, 2009 10:46:57 AM (15 years ago)
Author:
vboxsync
Message:

Additions/x11/VBoxClient: only allow disabling mouse integration if the host supports the guest changing the VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR capability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display.cpp

    r21923 r22706  
    4545    uint32_t fMouseFeatures = 0;
    4646
    47     LogFlowFunc(("\n"));
     47    LogFlowFunc(("enabling dynamic resizing\n"));
    4848    rcSystem = system("VBoxRandR --test");
    4949    if (-1 == rcSystem)
     
    5959    if (RT_SUCCESS(rc))
    6060        rc = VbglR3CtlFilterMask(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0);
     61    /* Log and ignore the return value, as there is not much we can do with
     62     * it. */
     63    LogFlowFunc(("dynamic resizing: result %Rrc\n", rc));
    6164    /* Enable support for switching between hardware and software cursors */
    62     rc = VbglR3CtlFilterMask(VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED, 0);
     65    LogFlowFunc(("enabling relative mouse re-capturing support\n"));
     66    rc = VbglR3GetMouseStatus(&fMouseFeatures, NULL, NULL);
    6367    if (RT_SUCCESS(rc))
    6468    {
    65         rc = VbglR3GetMouseStatus(&fMouseFeatures, NULL, NULL);
    66         if (RT_SUCCESS(rc))
    67             VbglR3SetMouseStatus(  fMouseFeatures
    68                                  & ~VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR);
     69        if (fMouseFeatures & VMMDEV_MOUSE_HOST_RECHECKS_NEEDS_HOST_CURSOR)
     70        {
     71            rc = VbglR3CtlFilterMask(VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED,
     72                                     0);
     73            if (RT_SUCCESS(rc))
     74                rc = VbglR3SetMouseStatus
     75                                   (  fMouseFeatures
     76                                    & ~VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR);
     77        }
     78        else
     79            rc = VERR_NOT_SUPPORTED;
    6980    }
    70     LogFlowFunc(("returning %Rrc\n", rc));
    71     return rc;
     81    LogFlowFunc(("mouse re-capturing support: result %Rrc\n", rc));
     82    return VINF_SUCCESS;
    7283}
    7384
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