VirtualBox

vbox的更動 3793 路徑 trunk/src/VBox/Devices/VMMDev


忽略:
時間撮記:
2007-7-23 下午04:02:49 (17 年 以前)
作者:
vboxsync
訊息:

Inform guest about seamless mode changes

位置:
trunk/src/VBox/Devices/VMMDev
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r3786 r3793  
    11661166                VMMDevSeamlessChangeRequest *seamlessChangeRequest = (VMMDevSeamlessChangeRequest*)requestHeader;
    11671167                /* just pass on the information */
    1168                 Log(("VMMDev: returning seamless change request mode=%d\n", pData->SeamlessMode));
    1169                 switch(pData->SeamlessMode)
    1170                 {
    1171                 case PDM_SEAMLESS_MODE_DISABLED:
     1168                Log(("VMMDev: returning seamless change request mode=%d\n", pData->fSeamlessEnabled));
     1169                if (pData->fSeamlessEnabled)
     1170                    seamlessChangeRequest->mode = VMMDev_Seamless_Visible_Region;
     1171                else
    11721172                    seamlessChangeRequest->mode = VMMDev_Seamless_Disabled;
    1173                     break;
    1174                 case PDM_SEAMLESS_MODE_VISIBLE_REGION:
    1175                     seamlessChangeRequest->mode = VMMDev_Seamless_Visible_Region;
    1176                     break;
    1177                 case PDM_SEAMLESS_MODE_HOSTWINDOW:
    1178                     seamlessChangeRequest->mode = VMMDev_Seamless_Host_Window;
    1179                     break;
    1180                 }
    11811173
    11821174                if (seamlessChangeRequest->eventAck == VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST)
    11831175                {
    11841176                    /* Remember which mode the client has queried. */
    1185                     pData->lastSeamlessMode = pData->SeamlessMode;
     1177                    pData->fLastSeamlessEnabled = pData->fSeamlessEnabled;
    11861178                }
    11871179
     
    16001592}
    16011593
    1602 static DECLCALLBACK(int) vmmdevRequestSeamlessChange(PPDMIVMMDEVPORT pInterface, PDMISEAMLESSMODE mode)
     1594static DECLCALLBACK(int) vmmdevRequestSeamlessChange(PPDMIVMMDEVPORT pInterface, bool fEnabled)
    16031595{
    16041596    VMMDevState *pData = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    16051597
    16061598    /* Verify that the new resolution is different and that guest does not yet know about it. */
    1607     bool fSameMode = (pData->lastSeamlessMode == mode);
    1608 
    1609     Log(("vmmdevRequestSeamlessChange: same=%d. new=%d\n", fSameMode, mode));
     1599    bool fSameMode = (pData->fLastSeamlessEnabled == fEnabled);
     1600
     1601    Log(("vmmdevRequestSeamlessChange: same=%d. new=%d\n", fSameMode, fEnabled));
    16101602
    16111603    if (!fSameMode)
    16121604    {
    16131605        /* we could validate the information here but hey, the guest can do that as well! */
    1614         pData->SeamlessMode = mode;
     1606        pData->fSeamlessEnabled = fEnabled;
    16151607
    16161608        /* IRQ so the guest knows what's going on */
     
    20142006
    20152007    /* disable seamless mode */
    2016 
    2017     pData->lastSeamlessMode = PDM_SEAMLESS_MODE_DISABLED;
     2008    pData->fLastSeamlessEnabled = false;
    20182009
    20192010    /* Clear the event variables.
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r3774 r3793  
    137137
    138138    /* seamless mode change request */
    139     PDMISEAMLESSMODE lastSeamlessMode, SeamlessMode;
     139    bool fLastSeamlessEnabled, fSeamlessEnabled;
    140140
    141141#ifdef TIMESYNC_BACKDOOR
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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