Changeset 78995 in vbox
- Timestamp:
- Jun 5, 2019 1:30:45 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131127
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmifs.h
r77451 r78995 1528 1528 * @param fForce Whether to deliver the request to the guest even if the guest has 1529 1529 * the requested resolution already. 1530 * @param fMayNotify Whether to send a hotplug notification to the guest if appropriate. 1530 1531 */ 1531 1532 DECLR3CALLBACKMEMBER(int, pfnRequestDisplayChange,(PPDMIVMMDEVPORT pInterface, uint32_t cDisplays, 1532 struct VMMDevDisplayDef const *paDisplays, bool fForce ));1533 struct VMMDevDisplayDef const *paDisplays, bool fForce, bool fMayNotify)); 1533 1534 1534 1535 /** … … 1628 1629 } PDMIVMMDEVPORT; 1629 1630 /** PDMIVMMDEVPORT interface ID. */ 1630 #define PDMIVMMDEVPORT_IID " 2ccc19a5-742a-4af0-a7d3-31ea67ff50e9"1631 #define PDMIVMMDEVPORT_IID "9e004f1a-875d-11e9-a673-c77c30f53623" 1631 1632 1632 1633 -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r78949 r78995 3570 3570 */ 3571 3571 static DECLCALLBACK(int) 3572 vmmdevIPort_RequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t cDisplays, VMMDevDisplayDef const *paDisplays, bool fForce )3572 vmmdevIPort_RequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t cDisplays, VMMDevDisplayDef const *paDisplays, bool fForce, bool fMayNotify) 3573 3573 { 3574 3574 int rc = VINF_SUCCESS; … … 3604 3604 /* We could validate the information here but hey, the guest can do that as well! */ 3605 3605 pRequest->displayChangeRequest = *p; 3606 pRequest->fPending = fDifferentResolution ;3606 pRequest->fPending = fDifferentResolution && fMayNotify; 3607 3607 3608 3608 fNotifyGuest = fNotifyGuest || fDifferentResolution; 3609 3609 } 3610 3610 3611 if (RT_SUCCESS(rc) )3611 if (RT_SUCCESS(rc) && fMayNotify) 3612 3612 { 3613 3613 if (fNotifyGuest) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r77910 r78995 1439 1439 CHECK_ERROR_BREAK(pDisplay, SetVideoModeHint(uDisplayIdx, fEnabled, 1440 1440 fChangeOrigin, iOriginX, iOriginY, 1441 uXRes, uYRes, uBpp ));1441 uXRes, uYRes, uBpp, true)); 1442 1442 } 1443 1443 else if (!strcmp(a->argv[1], "setscreenlayout")) -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r76553 r78995 2824 2824 gpDisplay->SetVideoModeHint(0 /*=display*/, true /*=enabled*/, false /*=changeOrigin*/, 2825 2825 0 /*=originX*/, 0 /*=originY*/, 2826 uResizeWidth, uResizeHeight, 0 /*=don't change bpp*/ );2826 uResizeWidth, uResizeHeight, 0 /*=don't change bpp*/, true /*=notify*/); 2827 2827 break; 2828 2828 … … 5225 5225 gpDisplay->SetVideoModeHint(0 /*=display*/, true /*=enabled*/, 5226 5226 false /*=changeOrigin*/, 0 /*=originX*/, 0 /*=originY*/, 5227 NewWidth, NewHeight, 0 /*don't change bpp*/ );5227 NewWidth, NewHeight, 0 /*don't change bpp*/, true /*=notify*/); 5228 5228 } 5229 5229 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r77703 r78995 316 316 display().SetVideoModeHint(screenId(), 317 317 uisession()->isScreenVisible(screenId()), 318 false, 0, 0, size.width(), size.height(), 0 );318 false, 0, 0, size.width(), size.height(), 0, true); 319 319 /* If host desires to have guest-screen disabled and guest-screen is enabled, retrying: */ 320 320 else if (!uisession()->isScreenVisibleHostDesires(screenId())) 321 display().SetVideoModeHint(screenId(), false, false, 0, 0, 0, 0, 0 );321 display().SetVideoModeHint(screenId(), false, false, 0, 0, 0, 0, 0, true); 322 322 /* If host desires to have guest-screen enabled and guest-screen is disabled, retrying: */ 323 323 else if (uisession()->isScreenVisibleHostDesires(screenId())) 324 display().SetVideoModeHint(screenId(), true, false, 0, 0, size.width(), size.height(), 0 );324 display().SetVideoModeHint(screenId(), true, false, 0, 0, size.width(), size.height(), 0, true); 325 325 } 326 326 } … … 332 332 display().SetVideoModeHint(screenId(), 333 333 uisession()->isScreenVisible(screenId()), 334 false, 0, 0, size.width(), size.height(), 0 );334 false, 0, 0, size.width(), size.height(), 0, true); 335 335 } 336 336 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r76606 r78995 129 129 LogRel(("GUI: UIMultiScreenLayout::update: Disabling excessive guest-screen %d\n", iGuestScreen)); 130 130 m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, false); 131 m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, false, false, 0, 0, 0, 0, 0 );131 m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, false, false, 0, 0, 0, 0, 0, true); 132 132 } 133 133 } … … 163 163 iGuestScreen, uWidth, uHeight)); 164 164 m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, true); 165 m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, true, false, 0, 0, uWidth, uHeight, 32 );165 m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, true, false, 0, 0, uWidth, uHeight, 32, true); 166 166 } 167 167 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r76606 r78995 225 225 { 226 226 uisession()->setScreenVisibleHostDesires(iIndex, false); 227 display().SetVideoModeHint(iIndex, false, false, 0, 0, 0, 0, 0 );227 display().SetVideoModeHint(iIndex, false, false, 0, 0, 0, 0, 0, true); 228 228 } 229 229 else … … 235 235 uHeight = 600; 236 236 uisession()->setScreenVisibleHostDesires(iIndex, true); 237 display().SetVideoModeHint(iIndex, true, false, 0, 0, uWidth, uHeight, 32 );237 display().SetVideoModeHint(iIndex, true, false, 0, 0, uWidth, uHeight, 32, true); 238 238 } 239 239 } … … 243 243 /* Resize guest to required size: */ 244 244 display().SetVideoModeHint(iIndex, uisession()->isScreenVisible(iIndex), 245 false, 0, 0, size.width(), size.height(), 0 );245 false, 0, 0, size.width(), size.height(), 0, true); 246 246 } 247 247 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r78778 r78995 166 166 m_sizeHintOverride = QSize(800, 600).expandedTo(sizeHint); 167 167 168 /* Send saved size-hint to the guest: */ 169 /// @todo What if not m_bIsGuestAutoresizeEnabled? 170 /// Just let the guest start at the default 800x600? 168 /* Restore saved monitor information to the guest. The guest may not respond 169 * until a suitable driver or helper is enabled (or at all). We do not notify 170 * the guest (aNotify == false), because there is technically no change (same 171 * hardware as before shutdown), and notifying would interfere with the Windows 172 * guest driver which saves the video mode to the registry on shutdown. */ 171 173 uisession()->setScreenVisibleHostDesires(screenId(), guestScreenVisibilityStatus()); 172 174 display().SetVideoModeHint(screenId(), 173 175 guestScreenVisibilityStatus(), 174 false, 0, 0, sizeHint.width(), sizeHint.height(), 0 );176 false, 0, 0, sizeHint.width(), sizeHint.height(), 0, false); 175 177 } 176 178 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r76606 r78995 177 177 display().SetVideoModeHint(screenId(), 178 178 guestScreenVisibilityStatus(), 179 false, 0, 0, sizeHint.width(), sizeHint.height(), 0 );179 false, 0, 0, sizeHint.width(), sizeHint.height(), 0, true); 180 180 } 181 181 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r78940 r78995 18381 18381 <enum 18382 18382 name="ScreenLayoutMode" 18383 uuid=" c7a9ee66-cfed-438b-9f8c-d3adf7588a4d"18383 uuid="8fa1964c-8774-11e9-ae5d-1f419105e68d" 18384 18384 wsmap="managed" 18385 18385 > … … 18403 18403 <desc> 18404 18404 Attach new screens and always set the new mode for existing screens. 18405 </desc> 18406 </const> 18407 18408 <const name="Silent" value="3"> 18409 <desc> 18410 Do not notify the guest of the change. Normally this is wished, but it 18411 might not be when re-setting monitor information from the last session 18412 (no hotplug happened, as it is still the same virtual monitor). 18405 18413 </desc> 18406 18414 </const> … … 18426 18434 <interface 18427 18435 name="IDisplay" extends="$unknown" 18428 uuid=" ab4164db-c13e-4dab-842d-61ee3f0c1e87"18436 uuid="4680b2de-8690-11e9-b83d-5719e53cf1de" 18429 18437 wsmap="managed" 18430 18438 wrap-hint-server-addinterfaces="IEventListener" … … 18558 18566 <desc> 18559 18567 The number of bits per pixel of the guest screen. 18568 </desc> 18569 </param> 18570 <param name="notify" type="boolean" dir="in"> 18571 <desc> 18572 Whether the guest should be notified of the change. Normally this 18573 is wished, but it might not be when re-setting monitor information 18574 from the last session (no hotplug happened, as it is still the same 18575 virtual monitor). Might also be useful if several monitors are to be 18576 changed at once, but this would not reflect physical hardware well, 18577 and we also have @a setScreenLayout for that. 18560 18578 </desc> 18561 18579 </param> -
trunk/src/VBox/Main/include/DisplayImpl.h
r78784 r78995 260 260 ULONG aWidth, 261 261 ULONG aHeight, 262 ULONG aBitsPerPixel); 262 ULONG aBitsPerPixel, 263 BOOL aNotify); 263 264 virtual HRESULT getVideoModeHint(ULONG aDisplay, 264 265 BOOL *aEnabled, -
trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
r78897 r78995 1294 1294 server->mConsole->i_getDisplay()->SetVideoModeHint(uScreenId, TRUE /*=enabled*/, 1295 1295 FALSE /*=changeOrigin*/, 0/*=OriginX*/, 0/*=OriginY*/, 1296 cWidth, cHeight, cBitsPerPixel );1296 cWidth, cHeight, cBitsPerPixel, TRUE /*=notify*/); 1297 1297 } 1298 1298 -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r78967 r78995 1949 1949 HRESULT Display::setVideoModeHint(ULONG aDisplay, BOOL aEnabled, 1950 1950 BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, 1951 ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel) 1951 ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel, 1952 BOOL aNotify) 1952 1953 { 1953 1954 if (aWidth == 0 || aHeight == 0 || aBitsPerPixel == 0) … … 2011 2012 aChangeOrigin ? aOriginY : ~0, 2012 2013 RT_BOOL(aEnabled), 2013 mfGuestVBVACapabilities 2014 & VBVACAPS_VIDEO_MODE_HINTS); 2014 ( mfGuestVBVACapabilities 2015 & VBVACAPS_VIDEO_MODE_HINTS) 2016 && aNotify); 2015 2017 if ( mfGuestVBVACapabilities & VBVACAPS_VIDEO_MODE_HINTS 2016 && !(mfGuestVBVACapabilities & VBVACAPS_IRQ)) 2018 && !(mfGuestVBVACapabilities & VBVACAPS_IRQ) 2019 && aNotify) 2017 2020 { 2018 2021 mParent->i_sendACPIMonitorHotPlugEvent(); … … 2028 2031 PPDMIVMMDEVPORT pVMMDevPort = pVMMDev->getVMMDevPort(); 2029 2032 if (pVMMDevPort) 2030 pVMMDevPort->pfnRequestDisplayChange(pVMMDevPort, 1, &d, false );2033 pVMMDevPort->pfnRequestDisplayChange(pVMMDevPort, 1, &d, false, aNotify); 2031 2034 } 2032 2035 /* Notify listeners. */ … … 3082 3085 bool const fForce = aScreenLayoutMode == ScreenLayoutMode_Reset 3083 3086 || aScreenLayoutMode == ScreenLayoutMode_Apply; 3084 pVMMDevPort->pfnRequestDisplayChange(pVMMDevPort, cDisplays, paDisplayDefs, fForce); 3087 bool const fNotify = aScreenLayoutMode != ScreenLayoutMode_Silent; 3088 pVMMDevPort->pfnRequestDisplayChange(pVMMDevPort, cDisplays, paDisplayDefs, fForce, fNotify); 3085 3089 3086 3090 RTMemFree(paDisplayDefs);
Note:
See TracChangeset
for help on using the changeset viewer.