VirtualBox

Changeset 27207 in vbox


Ignore:
Timestamp:
Mar 9, 2010 12:15:40 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New running VM core: mouse-shape-change callback processing fix.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r27081 r27207  
    10891089void UIMachineView::sltMousePointerShapeChanged()
    10901090{
     1091    /* Mouse supports 'absolute' mode? */
    10911092    if (uisession()->isMouseSupportsAbsolute())
    10921093    {
    1093         /* Should we use guest pointer shape? */
    1094         if (uisession()->isValidPointerShapePresent())
     1094        /* Should we hide pointer first of all? */
     1095        if (uisession()->isHidingHostPointer())
     1096            viewport()->setCursor(Qt::BlankCursor);
     1097        /* Or should we use guest pointer shape? */
     1098        else if (uisession()->isValidPointerShapePresent())
    10951099            viewport()->setCursor(uisession()->cursor());
    1096         /* Should we hide pointer at all? */
    1097         else if (uisession()->isHidingHostPointer())
    1098             viewport()->setCursor(Qt::BlankCursor);
     1100        /* Else we have no other way except unset cursor: */
     1101        else
     1102            viewport()->unsetCursor();
    10991103    }
    11001104}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r27141 r27207  
    663663            UIMousePointerShapeChangeEvent *pConsoleEvent = static_cast<UIMousePointerShapeChangeEvent*>(pEvent);
    664664
    665             /* Remember if we should show cursor: */
    666             m_fIsHideHostPointer = !pConsoleEvent->isVisible();
    667 
    668             /* Cache shape dataif present: */
     665            /* In case of shape data is present: */
    669666            if (pConsoleEvent->shapeData())
     667            {
     668                /* We are ignoring visibility flag: */
     669                m_fIsHideHostPointer = false;
     670
     671                /* And updating current cursor shape: */
    670672                setPointerShape(pConsoleEvent->shapeData(), pConsoleEvent->hasAlpha(),
    671673                                pConsoleEvent->xHot(), pConsoleEvent->yHot(),
    672674                                pConsoleEvent->width(), pConsoleEvent->height());
     675            }
     676            /* In case of shape data is NOT present: */
     677            else
     678            {
     679                /* Remember if we should hide the cursor: */
     680                m_fIsHideHostPointer = !pConsoleEvent->isVisible();
     681            }
    673682
    674683            /* Notify listeners about mouse capability changed: */
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