VirtualBox

Changeset 77130 in vbox


Ignore:
Timestamp:
Feb 1, 2019 4:55:20 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128588
Message:

pdmifs/DevVGA/DisplayImpl: add screen id to pfnVBVAReportCursorPosition.
bugref:9376: Complete hardware cursor implementation in VMSVGA.
vboxvideo in Linux passes cursor position information relative to a particular
screen, but we loose this information when we pass it on to the front-end.
Since no front-end has used the information yet this was not noticed. This
change fixes that and converts the co-ordinates to frame-buffer global ones
as early as possible.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmifs.h

    r76585 r77130  
    715715#endif
    716716
     717/** @name Flags for PDMIDISPLAYCONNECTOR::pfnVBVAReportCursorPosition.
     718 * @{ */
     719/** Is the data in the report valid? */
     720#define VBVA_CURSOR_VALID_DATA                              RT_BIT(0)
     721/** Is the cursor position reported relative to a particular guest screen? */
     722#define VBVA_CURSOR_SCREEN_RELATIVE                         RT_BIT(1)
     723/** @} */
    717724
    718725/** Pointer to a 2D graphics acceleration command. */
     
    10491056     *
    10501057     * @param   pInterface  Pointer to this interface.
    1051      * @param   fData       Does this report contain valid X and Y data or is
    1052      *                      it only reporting interface support?
     1058     * @param   fFlags      VBVA_CURSOR_*
     1059     * @param   uScreenId   The screen to which X and Y are relative if VBVA_CURSOR_SCREEN_RELATIVE is set.
    10531060     * @param   x           Cursor X offset.
    10541061     * @param   y           Cursor Y offset.
    10551062     * @thread  The emulation thread.
    10561063     */
    1057     DECLR3CALLBACKMEMBER(void, pfnVBVAReportCursorPosition,(PPDMIDISPLAYCONNECTOR pInterface, bool fData, uint32_t x, uint32_t y));
     1064    DECLR3CALLBACKMEMBER(void, pfnVBVAReportCursorPosition,(PPDMIDISPLAYCONNECTOR pInterface, uint32_t fFlags, uint32_t uScreen, uint32_t x, uint32_t y));
    10581065} PDMIDISPLAYCONNECTOR;
    10591066/** PDMIDISPLAYCONNECTOR interface ID. */
    1060 #define PDMIDISPLAYCONNECTOR_IID                "e648dac6-c918-11e7-8be6-a317e6b79645"
     1067#define PDMIDISPLAYCONNECTOR_IID                "f2a4c9fc-2613-11e9-bc48-bf934e641fc0"
    10611068
    10621069
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r76553 r77130  
    26602660                RT_UNTRUSTED_NONVOLATILE_COPY_FENCE();
    26612661
    2662                 LogRelFlowFunc(("VBVA: ChannelHandler: VBVA_CURSOR_POSITION: fReportPosition=%RTbool, x=%RU32, y=%RU32\n",
    2663                                 RT_BOOL(Report.fReportPosition), Report.x, Report.y));
    2664 
    2665                 pVGAState->pDrv->pfnVBVAReportCursorPosition(pVGAState->pDrv, RT_BOOL(Report.fReportPosition), Report.x, Report.y);
     2662                LogRelFlowFunc(("VBVA: ChannelHandler: VBVA_CURSOR_POSITION: fReportPosition=%RTbool, Id=%RU32, x=%RU32, y=%RU32\n",
     2663                                RT_BOOL(Report.fReportPosition), vbvaViewFromBufferPtr(pIns, pCtx, pvBuffer), Report.x, Report.y));
     2664
     2665                pVGAState->pDrv->pfnVBVAReportCursorPosition(pVGAState->pDrv, RT_BOOL(Report.fReportPosition), vbvaViewFromBufferPtr(pIns, pCtx, pvBuffer), Report.x, Report.y);
    26662666                pReport->x = pCtx->xCursor;
    26672667                pReport->y = pCtx->yCursor;
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r76562 r77130  
    380380    static DECLCALLBACK(void)  i_displayVBVAInputMappingUpdate(PPDMIDISPLAYCONNECTOR pInterface, int32_t xOrigin, int32_t yOrigin,
    381381                                                               uint32_t cx, uint32_t cy);
    382     static DECLCALLBACK(void)  i_displayVBVAReportCursorPosition(PPDMIDISPLAYCONNECTOR pInterface, bool fData, uint32_t x, uint32_t y);
     382    static DECLCALLBACK(void)  i_displayVBVAReportCursorPosition(PPDMIDISPLAYCONNECTOR pInterface, uint32_t fFlags, uint32_t uScreen, uint32_t x, uint32_t y);
    383383#endif
    384384
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r76553 r77130  
    44544454}
    44554455
    4456 DECLCALLBACK(void) Display::i_displayVBVAReportCursorPosition(PPDMIDISPLAYCONNECTOR pInterface, bool fData, uint32_t x, uint32_t y)
     4456DECLCALLBACK(void) Display::i_displayVBVAReportCursorPosition(PPDMIDISPLAYCONNECTOR pInterface, uint32_t fFlags, ULONG aScreenId, uint32_t x, uint32_t y)
    44574457{
    44584458    LogFlowFunc(("\n"));
     
    44614461    Display *pThis = pDrv->pDisplay;
    44624462
    4463     fireCursorPositionChangedEvent(pThis->mParent->i_getEventSource(), fData, x, y);
     4463    if (fFlags & VBVA_CURSOR_SCREEN_RELATIVE)
     4464    {
     4465        x += pThis->maFramebuffers[aScreenId].xOrigin;
     4466        y += pThis->maFramebuffers[aScreenId].yOrigin;
     4467    }
     4468    fireCursorPositionChangedEvent(pThis->mParent->i_getEventSource(), RT_BOOL(fFlags & VBVA_CURSOR_VALID_DATA), x, y);
    44644469}
    44654470
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette