VirtualBox

Ignore:
Timestamp:
May 21, 2008 1:29:06 PM (17 years ago)
Author:
vboxsync
Message:

Additions/x11: keep the cursor visible when we disable mouse integration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/xgraphics/vboxutils.c

    r9006 r9016  
    437437vbox_set_cursor_position(ScrnInfoPtr pScrn, int x, int y)
    438438{
    439     /* VBOXPtr pVBox = pScrn->driverPrivate; */
    440 
    441     /* TRACE_ENTRY(); */
    442 
     439    VBOXPtr pVBox = pScrn->driverPrivate;
     440    int vrc;
     441    uint32_t fFeatures;
     442
     443    TRACE_ENTRY();
     444    /* Check whether we are using the hardware cursor or not, and whether this
     445       has changed since the last time we checked. */
     446    vrc = VbglR3GetMouseStatus(&fFeatures, NULL, NULL);
     447    if (!!(fFeatures & VBOXGUEST_MOUSE_HOST_CAN_ABSOLUTE) != pVBox->usingHWCursor)
     448    {
     449        pVBox->usingHWCursor = !!(fFeatures & VBOXGUEST_MOUSE_HOST_CAN_ABSOLUTE);
     450        /* This triggers a cursor image reload */
     451        if (pVBox->accessEnabled)
     452        {
     453            pScrn->EnableDisableFBAccess(pScrn->scrnIndex, FALSE);
     454            pScrn->EnableDisableFBAccess(pScrn->scrnIndex, TRUE);
     455        }
     456    }
     457   
    443458    /* don't disable the mouse cursor if we go out of our visible area
    444459     * since the mouse cursor is drawn by the host anyway */
     
    753768    if (!pVBox->useDevice)
    754769        return FALSE;
     770    /* Initially assume we are using a hardware cursor, but this is
     771       updated every time the mouse moves anyway. */
     772    pVBox->usingHWCursor = TRUE;
    755773    pVBox->pCurs = pCurs = xf86CreateCursorInfoRec();
    756774    if (!pCurs)
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