VirtualBox

Changeset 27309 in vbox


Ignore:
Timestamp:
Mar 11, 2010 11:19:50 PM (15 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: do not save the video mode for size hints sent while in seamless

Location:
trunk/src/VBox/Additions
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp

    r26425 r27309  
    6767    int rc;
    6868
     69#if !defined(VBOX_VBGLR3_XFREE86)
    6970    AssertPtrReturn(pMode, VERR_INVALID_PARAMETER);
     71#endif
    7072    waitEvent.u32TimeoutIn = RT_INDEFINITE_WAIT;
    7173    waitEvent.u32EventMaskIn = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
     
    9294        else
    9395            rc = VERR_TRY_AGAIN;
     96    }
     97    return rc;
     98}
     99
     100/**
     101 * Request the last seamless mode switch from the host again.
     102 *
     103 * @returns IPRT status value
     104 * @retval  pMode on success, the seamless mode that was switched into (i.e.
     105 *          disabled, visible region or host window)
     106 */
     107VBGLR3DECL(int) VbglR3SeamlessGetLastEvent(VMMDevSeamlessMode *pMode)
     108{
     109    int rc;
     110
     111#if !defined(VBOX_VBGLR3_XFREE86)
     112    AssertPtrReturn(pMode, VERR_INVALID_PARAMETER);
     113#endif
     114    VMMDevSeamlessChangeRequest seamlessChangeRequest;
     115
     116    /* get the seamless change request */
     117    vmmdevInitRequest(&seamlessChangeRequest.header, VMMDevReq_GetSeamlessChangeRequest);
     118    seamlessChangeRequest.eventAck = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
     119    rc = vbglR3GRPerform(&seamlessChangeRequest.header);
     120    if (RT_SUCCESS(rc))
     121    {
     122        *pMode = seamlessChangeRequest.mode;
     123        return VINF_SUCCESS;
    94124    }
    95125    return rc;
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c

    r26562 r27309  
    209209
    210210    pVBox = pScrn->driverPrivate;
    211     TRACE_ENTRY();
    212211    if (pVBox->useVbva == FALSE)
    213212        return;
     
    10191018}
    10201019
     1020Bool
     1021vboxGuestIsSeamless(ScrnInfoPtr pScrn)
     1022{
     1023    VMMDevSeamlessMode mode;
     1024    VBOXPtr pVBox = pScrn->driverPrivate;
     1025    TRACE_ENTRY();
     1026    if (!pVBox->useDevice)
     1027        return FALSE;
     1028    if (RT_FAILURE(VbglR3SeamlessGetLastEvent(&mode)))
     1029        return FALSE;
     1030    return (mode != VMMDev_Seamless_Disabled);
     1031}
     1032
    10211033/**
    10221034 * Save video mode parameters to the registry.
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r25486 r27309  
    253253
    254254extern Bool vboxHostLikesVideoMode(ScrnInfoPtr pScrn, uint32_t cx, uint32_t cy, uint32_t cBits);
     255extern Bool vboxGuestIsSeamless(ScrnInfoPtr pScrn);
    255256extern Bool vboxSaveVideoMode(ScrnInfoPtr pScrn, uint32_t cx, uint32_t cy, uint32_t cBits);
    256257extern Bool vboxRetrieveVideoMode(ScrnInfoPtr pScrn, uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits);
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_13.c

    r27035 r27309  
    295295    VBOXSetMode(crtc->scrn, adjusted_mode);
    296296    VBOXAdjustFrame(crtc->scrn->scrnIndex, x, y, 0);
    297     vboxSaveVideoMode(crtc->scrn, adjusted_mode->HDisplay,
    298                       adjusted_mode->VDisplay, crtc->scrn->bitsPerPixel);
     297    /* Don't remember any modes set while we are seamless, as they are
     298     * just temporary. */
     299    if (!vboxGuestIsSeamless(crtc->scrn))
     300        vboxSaveVideoMode(crtc->scrn, adjusted_mode->HDisplay,
     301                          adjusted_mode->VDisplay, crtc->scrn->bitsPerPixel);
    299302}
    300303
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