Changeset 65234 in vbox
- Timestamp:
- Jan 11, 2017 7:47:57 AM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r63054 r65234 48 48 UIMultiScreenLayout::UIMultiScreenLayout(UIMachineLogic *pMachineLogic) 49 49 : m_pMachineLogic(pMachineLogic) 50 , m_cGuestScreens(m_pMachineLogic->machine().GetMonitorCount()) 51 , m_cHostScreens(0) 50 52 { 51 53 /* Calculate host/guest screen count: */ … … 69 71 * We have to make sure they are valid, which means there have to be unique combinations 70 72 * and all guests screens need there own host screen. */ 71 CDisplay display = m_pMachineLogic->session().GetConsole().GetDisplay();72 73 bool fShouldWeAutoMountGuestScreens = gEDataManager->autoMountGuestScreensEnabled(vboxGlobal().managedVMUuid()); 73 74 LogRel(("GUI: UIMultiScreenLayout::update: GUI/AutomountGuestScreens is %s\n", fShouldWeAutoMountGuestScreens ? "enabled" : "disabled")); … … 130 131 /* Then we have to disable excessive guest-screen: */ 131 132 LogRel(("GUI: UIMultiScreenLayout::update: Disabling excessive guest-screen %d\n", iGuestScreen)); 132 display.SetVideoModeHint(iGuestScreen, false, false, 0, 0, 0, 0, 0);133 m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, false, false, 0, 0, 0, 0, 0); 133 134 m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, false); 134 135 } … … 164 165 LogRel(("GUI: UIMultiScreenLayout::update: Enabling guest-screen %d with following resolution: %dx%d\n", 165 166 iGuestScreen, uWidth, uHeight)); 166 display.SetVideoModeHint(iGuestScreen, true, false, 0, 0, uWidth, uHeight, 32);167 m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, true, false, 0, 0, uWidth, uHeight, 32); 167 168 m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, true); 168 169 } … … 227 228 /* Check the memory requirements first: */ 228 229 bool fSuccess = true; 229 CMachine machine = m_pMachineLogic->session().GetMachine();230 230 if (m_pMachineLogic->uisession()->isGuestSupportsGraphics()) 231 231 { 232 quint64 availBits = m achine.GetVRAMSize() * _1M * 8;232 quint64 availBits = m_pMachineLogic->machine().GetVRAMSize() * _1M * 8; 233 233 quint64 usedBits = memoryRequirements(tmpMap); 234 234 fSuccess = availBits >= usedBits; … … 263 263 void UIMultiScreenLayout::calculateGuestScreenCount() 264 264 { 265 /* Get machine: */266 CMachine machine = m_pMachineLogic->session().GetMachine();267 265 /* Enumerate all the guest screens: */ 268 266 m_guestScreens.clear(); 269 267 m_disabledGuestScreens.clear(); 270 for (uint iGuestScreen = 0; iGuestScreen < m achine.GetMonitorCount(); ++iGuestScreen)268 for (uint iGuestScreen = 0; iGuestScreen < m_cGuestScreens; ++iGuestScreen) 271 269 if (m_pMachineLogic->uisession()->isScreenVisible(iGuestScreen)) 272 270 m_guestScreens << iGuestScreen; … … 292 290 LONG yOrigin = 0; 293 291 quint64 usedBits = 0; 294 CDisplay display = m_pMachineLogic->uisession()->session().GetConsole().GetDisplay();295 292 foreach (int iGuestScreen, m_guestScreens) 296 293 { … … 301 298 screen = gpDesktop->screenGeometry(screenLayout.value(iGuestScreen, 0)); 302 299 KGuestMonitorStatus monitorStatus = KGuestMonitorStatus_Enabled; 303 display.GetScreenResolution(iGuestScreen, width, height, guestBpp, xOrigin, yOrigin, monitorStatus);300 m_pMachineLogic->display().GetScreenResolution(iGuestScreen, width, height, guestBpp, xOrigin, yOrigin, monitorStatus); 304 301 usedBits += screen.width() * /* display width */ 305 302 screen.height() * /* display height */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h
r62493 r65234 75 75 QList<int> m_guestScreens; 76 76 QList<int> m_disabledGuestScreens; 77 const uint m_cGuestScreens; 77 78 int m_cHostScreens; 78 79 QMap<int, int> m_screenMap;
Note:
See TracChangeset
for help on using the changeset viewer.