VirtualBox

Changeset 26964 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 2, 2010 5:53:21 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New running VM core: multi-monitor absolute mouse issue fix.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

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

    r26929 r26964  
    11001100    if (uisession()->isMouseSupportsAbsolute())
    11011101    {
    1102         /* Should we hide/show pointer? */
    1103         if (uisession()->isHidingHostPointer())
     1102        /* Should we use guest pointer shape? */
     1103        if (uisession()->isValidPointerShapePresent())
     1104            viewport()->setCursor(uisession()->cursor());
     1105        /* Should we hide pointer at all? */
     1106        else if (uisession()->isHidingHostPointer())
    11041107            viewport()->setCursor(Qt::BlankCursor);
    1105         else
    1106             viewport()->setCursor(uisession()->cursor());
    11071108    }
    11081109}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r26921 r26964  
    554554    , m_fIsMouseCaptured(false)
    555555    , m_fIsMouseIntegrated(true)
     556    , m_fIsValidPointerShapePresent(false)
    556557    , m_fIsHideHostPointer(true)
    557558{
     
    973974    AssertMsg(pShapeData, ("Shape data must not be NULL!\n"));
    974975
     976    m_fIsValidPointerShapePresent = false;
    975977    const uchar *srcAndMaskPtr = pShapeData;
    976978    uint andMaskSize = (uWidth + 7) / 8 * uHeight;
     
    10951097                DestroyIcon(m_alphaCursor);
    10961098            m_alphaCursor = hAlphaCursor;
     1099            m_fIsValidPointerShapePresent = true;
    10971100        }
    10981101    }
     
    11511154        /* Set the new cursor: */
    11521155        m_cursor = QCursor(XcursorImageLoadCursor(QX11Info::display(), img));
     1156        m_fIsValidPointerShapePresent = true;
    11531157
    11541158        XcursorImageDestroy(img);
     
    11901194    /* Set the new cursor: */
    11911195    m_cursor = QCursor(QPixmap::fromImage(image), uXHot, uYHot);
     1196    m_fIsValidPointerShapePresent = true;
    11921197    NOREF(srcShapePtrScan);
    11931198
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r26952 r26964  
    114114    bool isMouseCaptured() const { return m_fIsMouseCaptured; }
    115115    bool isMouseIntegrated() const { return m_fIsMouseIntegrated; }
     116    bool isValidPointerShapePresent() const { return m_fIsValidPointerShapePresent; }
    116117    bool isHidingHostPointer() const { return m_fIsMouseCaptured || (m_fIsMouseSupportsAbsolute && m_fIsHideHostPointer); }
    117118
     
    211212    bool m_fIsMouseCaptured : 1;
    212213    bool m_fIsMouseIntegrated : 1;
     214    bool m_fIsValidPointerShapePresent : 1;
    213215    bool m_fIsHideHostPointer : 1;
    214216
  • trunk/src/VBox/Main/MouseImpl.cpp

    r26935 r26964  
    428428    HRESULT rc = convertDisplayWidth(x, &mouseXAbs);
    429429    ComAssertComRCRet(rc, rc);
    430     if (mouseXAbs > 0xffff)
    431         mouseXAbs = mLastAbsX;
     430    /// TODO: Remove those strings?
     431    //if (mouseXAbs > 0xffff)
     432    //    mouseXAbs = mLastAbsX;
    432433
    433434    uint32_t mouseYAbs;
    434435    rc = convertDisplayHeight(y, &mouseYAbs);
    435436    ComAssertComRCRet(rc, rc);
    436     if (mouseYAbs > 0xffff)
    437         mouseYAbs = mLastAbsY;
     437    /// TODO: Remove those strings?
     438    //if (mouseYAbs > 0xffff)
     439    //    mouseYAbs = mLastAbsY;
    438440
    439441    uint32_t fButtons = mouseButtonsToPDM(buttonState);
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