VirtualBox

Ignore:
Timestamp:
Mar 3, 2015 9:36:04 PM (10 years ago)
Author:
vboxsync
Message:

VBoxGuest: Call vbgdResetMouseStatusOnHost at init too. Removed internal flipping of VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR since nobody is actually using the internal state for anything at present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r54609 r54612  
    10731073            {
    10741074                /*
    1075                  * Set the fixed event and make sure guest capabilities are cleared.
     1075                 * Set the fixed event and make sure the host doesn't have any lingering
     1076                 * the guest capabilities or mouse status bits set.
    10761077                 */
    10771078                rc = vbgdResetEventFilterOnHost(pDevExt, pDevExt->fFixedEvents);
     
    10811082                    if (RT_SUCCESS(rc))
    10821083                    {
    1083                         /*
    1084                          * Initialize stuff which may fail without requiring the driver init to fail.
    1085                          */
    1086                         vbgdInitFixateGuestMappings(pDevExt);
    1087                         vbgdHeartbeatInit(pDevExt);
    1088 
    1089                         /*
    1090                          * Done!
    1091                          */
    1092                         rc = vbgdReportDriverStatus(true /* Driver is active */);
    1093                         if (RT_FAILURE(rc))
    1094                             LogRel(("VbgdCommonInitDevExt: VBoxReportGuestDriverStatus failed, rc=%Rrc\n", rc));
    1095 
    1096                         LogFlowFunc(("VbgdCommonInitDevExt: returns success\n"));
    1097                         return VINF_SUCCESS;
     1084                        rc = vbgdResetMouseStatusOnHost(pDevExt);
     1085                        if (RT_SUCCESS(rc))
     1086                        {
     1087                            /*
     1088                             * Initialize stuff which may fail without requiring the driver init to fail.
     1089                             */
     1090                            vbgdInitFixateGuestMappings(pDevExt);
     1091                            vbgdHeartbeatInit(pDevExt);
     1092
     1093                            /*
     1094                             * Done!
     1095                             */
     1096                            rc = vbgdReportDriverStatus(true /* Driver is active */);
     1097                            if (RT_FAILURE(rc))
     1098                                LogRel(("VbgdCommonInitDevExt: VBoxReportGuestDriverStatus failed, rc=%Rrc\n", rc));
     1099
     1100                            LogFlowFunc(("VbgdCommonInitDevExt: returns success\n"));
     1101                            return VINF_SUCCESS;
     1102                        }
     1103                        LogRel(("VbgdCommonInitDevExt: failed to clear mouse status: rc=%Rrc\n", rc));
    10981104                    }
     1105                    else
     1106                        LogRel(("VbgdCommonInitDevExt: failed to clear guest capabilities: rc=%Rrc\n", rc));
    10991107                }
    1100 
    1101                 LogRel(("VbgdCommonInitDevExt: failed to set host flags, rc=%Rrc\n", rc));
     1108                else
     1109                    LogRel(("VbgdCommonInitDevExt: failed to set fixed event filter: rc=%Rrc\n", rc));
    11021110            }
    11031111            else
    1104                 LogRel(("VbgdCommonInitDevExt: VBoxReportGuestInfo failed, rc=%Rrc\n", rc));
     1112                LogRel(("VbgdCommonInitDevExt: VBoxReportGuestInfo failed: rc=%Rrc\n", rc));
    11051113            VbglGRFree((VMMDevRequestHeader *)pDevExt->pIrqAckEvents);
    11061114        }
    11071115        else
    1108             LogRel(("VbgdCommonInitDevExt: VBoxGRAlloc failed, rc=%Rrc\n", rc));
     1116            LogRel(("VbgdCommonInitDevExt: VBoxGRAlloc failed: rc=%Rrc\n", rc));
    11091117
    11101118        VbglTerminate();
    11111119    }
    11121120    else
    1113         LogRel(("VbgdCommonInitDevExt: VbglInit failed, rc=%Rrc\n", rc));
     1121        LogRel(("VbgdCommonInitDevExt: VbglInit failed: rc=%Rrc\n", rc));
    11141122
    11151123    rc2 = RTSemFastMutexDestroy(pDevExt->MemBalloon.hMtx); AssertRC(rc2);
     
    28092817            if (pReq)
    28102818            {
    2811                 /* Since VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR is inverted in the session
    2812                  * capabilities we invert it again here before sending it to the host. */
    2813                 pReq->mouseFeatures = pDevExt->MouseStatusTracker.fMask ^ VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR;
     2819                pReq->mouseFeatures = pDevExt->MouseStatusTracker.fMask;
    28142820                if (pReq->mouseFeatures == pDevExt->fMouseStatusHost)
    28152821                    rc = VINF_SUCCESS;
     
    28632869    if (fFeatures & ~VMMDEV_MOUSE_GUEST_MASK)
    28642870        return VERR_INVALID_PARAMETER;
    2865 
    2866     /* Since this is more of a negative feature we invert it to get the real
    2867      * feature (when the guest does not need the host cursor). */
    2868     fFeatures ^= VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR;
    28692871
    28702872    return vbgdSetSessionMouseStatus(pDevExt, pSession, fFeatures, ~fFeatures, false /*fSessionTermination*/);
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