Changeset 98450 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 2, 2023 2:46:36 PM (2 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r98399 r98450 1871 1871 if ( ulGuestBitsPerPixel != ulBitsPerPixel 1872 1872 && ulGuestBitsPerPixel != 0 1873 && m_pMachineView->ui session()->isGuestSupportsGraphics())1873 && m_pMachineView->uimachine()->isGuestSupportsGraphics()) 1874 1874 UINotificationMessage::remindAboutWrongColorDepth(ulGuestBitsPerPixel, ulBitsPerPixel); 1875 1875 else -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98432 r98450 235 235 { 236 236 /* Make sure action-pool knows whether GA supports graphics: */ 237 actionPool()->toRuntime()->setGuestSupportsGraphics( uisession()->isGuestSupportsGraphics());237 actionPool()->toRuntime()->setGuestSupportsGraphics(isGuestSupportsGraphics()); 238 238 /* Enable/Disable Upgrade Additions action depending on feature status: */ 239 239 actionPool()->action(UIActionIndexRT_M_Devices_S_UpgradeGuestAdditions)->setEnabled(uisession()->guestAdditionsUpgradable()); … … 421 421 /* Remember last full-screen size: */ 422 422 m_monitorLastFullScreenSizeVector[(int)uScreenId] = size; 423 } 424 425 bool UIMachine::isGuestAdditionsActive() const 426 { 427 return uisession()->isGuestAdditionsActive(); 428 } 429 430 bool UIMachine::isGuestSupportsGraphics() const 431 { 432 return uisession()->isGuestSupportsGraphics(); 433 } 434 435 bool UIMachine::isGuestSupportsSeamless() const 436 { 437 return uisession()->isGuestSupportsSeamless(); 423 438 } 424 439 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98432 r98450 272 272 /** @} */ 273 273 274 /** @name Guest additions stuff. 275 ** @{ */ 276 /** Returns whether guest additions is active. */ 277 bool isGuestAdditionsActive() const; 278 /** Returns whether guest additions supports graphics. */ 279 bool isGuestSupportsGraphics() const; 280 /** Returns whether guest additions supports seamless. */ 281 bool isGuestSupportsSeamless() const; 282 /** @} */ 283 274 284 /** @name Keyboard stuff. 275 285 ** @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98432 r98450 586 586 LogRel3(("GUI: UIMachineLogic::sltAdditionsStateChanged: Adjusting actions availability according to GA state.\n")); 587 587 actionPool()->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(uimachine()->isVisualStateAllowed(UIVisualStateType_Seamless) && 588 ui session()->isGuestSupportsSeamless());588 uimachine()->isGuestSupportsSeamless()); 589 589 } 590 590 … … 2285 2285 { 2286 2286 /* Do not process if additions are not loaded! */ 2287 if (!ui session()->isGuestAdditionsActive())2287 if (!uimachine()->isGuestAdditionsActive()) 2288 2288 UINotificationMessage::remindAboutGuestAdditionsAreNotActive(); 2289 2289 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r98432 r98450 681 681 * ourselves. Windows guests should use VBoxVGA controllers, not VMSVGA. */ 682 682 if ( !isFullscreenOrSeamless() 683 && ui session()->isGuestSupportsGraphics()683 && uimachine()->isGuestSupportsGraphics() 684 684 && (machine().GetGraphicsAdapter().GetGraphicsControllerType() != KGraphicsControllerType_VMSVGA)) 685 685 setStoredGuestScreenSizeHint(frameBufferSizeNew); … … 779 779 * Do not send a hint if nothing has changed to prevent the guest being notified about its own changes. */ 780 780 if ( !isFullscreenOrSeamless() 781 && ui session()->isGuestSupportsGraphics()781 && uimachine()->isGuestSupportsGraphics() 782 782 && ( (int)frameBuffer()->width() != size.width() 783 783 || (int)frameBuffer()->height() != size.height() … … 854 854 } 855 855 /* Do not send a hint if GA supports graphics and we have sent that hint already: */ 856 if (fSendHint && ui session()->isGuestSupportsGraphics() && m_lastSizeHint == size)856 if (fSendHint && uimachine()->isGuestSupportsGraphics() && m_lastSizeHint == size) 857 857 { 858 858 LogRel(("GUI: UIMachineView::sltPerformGuestResize: Omitting to send size-hint %dx%d to guest-screen %d " … … 914 914 * Do not send a hint if nothing has changed to prevent the guest being notified about its own changes. */ 915 915 if ( !isFullscreenOrSeamless() 916 && ui session()->isGuestSupportsGraphics()916 && uimachine()->isGuestSupportsGraphics() 917 917 && ( frameBuffer()->width() != uWidth 918 918 || frameBuffer()->height() != uHeight … … 965 965 * Do not send a hint if nothing has changed to prevent the guest being notified about its own changes. */ 966 966 if ( !isFullscreenOrSeamless() 967 && ui session()->isGuestSupportsGraphics()967 && uimachine()->isGuestSupportsGraphics() 968 968 && ( (int)frameBuffer()->width() != size.width() 969 969 || (int)frameBuffer()->height() != size.height() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r98386 r98450 236 236 /* Check the memory requirements first: */ 237 237 bool fSuccess = true; 238 if (m_pMachineLogic->ui session()->isGuestSupportsGraphics())238 if (m_pMachineLogic->uimachine()->isGuestSupportsGraphics()) 239 239 { 240 240 quint64 availBits = m_pMachineLogic->machine().GetGraphicsAdapter().GetVRAMSize() * _1M * 8; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r98432 r98450 84 84 { 85 85 /* Check if there is enough physical memory to enter fullscreen: */ 86 if (ui session()->isGuestSupportsGraphics())86 if (uimachine()->isGuestSupportsGraphics()) 87 87 { 88 88 quint64 availBits = machine().GetGraphicsAdapter().GetVRAMSize() /* VRAM */ * _1M /* MiB to bytes */ * 8 /* to bits */; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r98386 r98450 128 128 m_fGuestAutoresizeEnabled = fEnabled; 129 129 130 if (m_fGuestAutoresizeEnabled && ui session()->isGuestSupportsGraphics())130 if (m_fGuestAutoresizeEnabled && uimachine()->isGuestSupportsGraphics()) 131 131 sltPerformGuestResize(); 132 132 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r98432 r98450 90 90 { 91 91 /* And supported: */ 92 if (ui session()->isGuestSupportsSeamless())92 if (uimachine()->isGuestSupportsSeamless()) 93 93 { 94 94 LogRel(("GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: " -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r98419 r98450 70 70 setMaximumGuestSize(); 71 71 /* And resize guest to current window size: */ 72 if (m_fGuestAutoresizeEnabled && ui session()->isGuestSupportsGraphics())72 if (m_fGuestAutoresizeEnabled && uimachine()->isGuestSupportsGraphics()) 73 73 QTimer::singleShot(300, this, SLOT(sltPerformGuestResize())); 74 74 break; … … 142 142 m_fGuestAutoresizeEnabled = fEnabled; 143 143 144 if (m_fGuestAutoresizeEnabled && ui session()->isGuestSupportsGraphics())144 if (m_fGuestAutoresizeEnabled && uimachine()->isGuestSupportsGraphics()) 145 145 sltPerformGuestResize(); 146 146 } … … 205 205 * or the guest-additions doesn't support graphics 206 206 * we should take scroll-bars size-hints into account: */ 207 if (!m_fGuestAutoresizeEnabled || !ui session()->isGuestSupportsGraphics())207 if (!m_fGuestAutoresizeEnabled || !uimachine()->isGuestSupportsGraphics()) 208 208 { 209 209 if (verticalScrollBar()->isVisible()) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r98432 r98450 670 670 * we should deduce widget's size-hint on visible scroll-bar's hint: */ 671 671 if ( !machineView()->isGuestAutoresizeEnabled() 672 || !ui session()->isGuestSupportsGraphics())672 || !uimachine()->isGuestSupportsGraphics()) 673 673 { 674 674 if (machineView()->verticalScrollBar()->isVisible()) … … 694 694 if ( frGeoNew != frGeo 695 695 && ( !machineView()->isGuestAutoresizeEnabled() 696 || !ui session()->isGuestSupportsGraphics()))696 || !uimachine()->isGuestSupportsGraphics())) 697 697 { 698 698 /* Determine whether we need additional space for one or both scroll-bars: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r98432 r98450 80 80 { 81 81 /* Check if there is enough physical memory to enter seamless: */ 82 if (ui session()->isGuestSupportsSeamless())82 if (uimachine()->isGuestSupportsSeamless()) 83 83 { 84 84 quint64 availBits = machine().GetGraphicsAdapter().GetVRAMSize() /* VRAM */ * _1M /* MiB to bytes */ * 8 /* to bits */; … … 129 129 130 130 /* If 'seamless' visual-state type is no more supported: */ 131 if (!ui session()->isGuestSupportsSeamless())131 if (!uimachine()->isGuestSupportsSeamless()) 132 132 { 133 133 LogRel(("GUI: UIMachineLogicSeamless::sltCheckForRequestedVisualStateType: "
Note:
See TracChangeset
for help on using the changeset viewer.