VirtualBox

Changeset 6565 in vbox


Ignore:
Timestamp:
Jan 29, 2008 12:53:19 PM (17 years ago)
Author:
vboxsync
Message:

Fix for Todo in r27575. added as new function as we cannot use function overloading.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r6518 r6565  
    14231423VBGLR3DECL(int)     VbglR3VideoAccelFlush(void);
    14241424VBGLR3DECL(int)     VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cbImg);
     1425VBGLR3DECL(int)     VbglR3SetPointerShapeReq(VMMDevReqMousePointer *pReq);
    14251426/** @}  */
    14261427
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp

    r6531 r6565  
    9999
    100100/**
     101 * Send mouse pointer shape information to the host.
     102 * This version of the function accepts a request for clients that
     103 * already allocate and manipulate the request structure directly.
     104 *
     105 * @returns VBox status code.
     106 *
     107 * @param   pReq        Pointer to the VMMDevReqMousePointer structure.
     108 */
     109VBGLR3DECL(int) VbglR3SetPointerShapeReq(VMMDevReqMousePointer *pReq)
     110{
     111    int rc = vbglR3GRPerform(&pReq->header);
     112    if (RT_SUCCESS(rc))
     113        rc = pReq->header.rc;
     114    return rc;
     115}
     116
     117
     118/**
    101119 * Query the last display change request.
    102120 *
  • trunk/src/VBox/Additions/x11/xgraphics/Makefile.kmk

    r6555 r6565  
    195195vboxvideo_drv_LIBS = \
    196196        $(VBOX_LIB_VBGL_R3) \
    197         $(VBOX_LIB_IPRT_GUEST_R3) \
     197        $(VBOX_LIB_IPRT_GUEST_R3_MINI) \
    198198        $(VBOX_LIB_VBGL_R3)
    199199## @todo Use VBOX_LIB_IPRT_GUEST_R3_MINI instead of VBOX_LIB_IPRT_GUEST_R3?
  • trunk/src/VBox/Additions/x11/xgraphics/vboxutils-new.c

    r6547 r6565  
    361361    int rc;
    362362    pVBox->reqp->fFlags = 0;
    363     rc = VbglR3SetPointerShape(0, pVBox->reqp->xHot, pVBox->reqp->yHot, pVBox->reqp->width,
    364                                pVBox->reqp->height, pVBox->reqp->pointerData,
    365                                pVBox->pointerSize);
     363    rc = VbglR3SetPointerShapeReq(pVBox->reqp);
    366364    if (RT_FAILURE(rc))
    367365        xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not hide the virtual mouse pointer.\n");
     
    373371    int rc;
    374372    pVBox->reqp->fFlags = VBOX_MOUSE_POINTER_VISIBLE;
    375     rc = VbglR3SetPointerShape(VBOX_MOUSE_POINTER_VISIBLE, pVBox->reqp->xHot, pVBox->reqp->yHot,
    376                                pVBox->reqp->width, pVBox->reqp->height, pVBox->reqp->pointerData,
    377                                pVBox->pointerSize);
     373    rc = VbglR3SetPointerShapeReq(pVBox->reqp);
    378374    if (RT_FAILURE(rc))
    379375        xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not unhide the virtual mouse pointer.\n");
     
    393389#endif
    394390
    395     rc = VbglR3SetPointerShape(reqp->fFlags, reqp->xHot, reqp->yHot, reqp->width, reqp->height,
    396                                reqp->pointerData, pVBox->pointerSize);
     391    rc = VbglR3SetPointerShapeReq(reqp);
    397392    if (RT_FAILURE(rc))
    398393        xf86DrvMsg(pScrn->scrnIndex, X_ERROR,  "Unable to set the virtual mouse pointer image.\n");
     
    663658                 (unsigned long)sizeRequest);
    664659
    665     /** @todo r=bird: The VbglR3SetPointerShape API and this code seems to
    666      * end up doing the stuff twice, at least wrt memory. It would make much
    667      * more sense to have a VbglR3SetPointerShape version which took a
    668      * VMMDevReqMousePointer pointer instead. Sorry for not spotting this
    669      * the first time around. */
    670660    reqp = (VMMDevReqMousePointer *)p;
    671661    *reqp = *pVBox->reqp;
     
    710700    }
    711701
    712     VbglR3SetPointerShape(VBOX_MOUSE_POINTER_SHAPE | VBOX_MOUSE_POINTER_ALPHA, bitsp->xhot, bitsp->yhot, w, h,
    713                           pm, pVBox->pointerSize);
     702    VbglR3SetPointerShapeReq(reqp);
    714703    xfree(p);
    715704}
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