Changeset 59079 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 10, 2015 4:07:16 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r58943 r59079 307 307 "Sending guest size-hint to screen %d as %dx%d\n", 308 308 (int)screenId(), size.width(), size.height())); 309 display().SetVideoModeHint(screenId(), 310 uisession()->isScreenVisible(screenId()), 311 false, 0, 0, size.width(), size.height(), 0); 309 310 /* If auto-mount of guest-screens (auto-pilot) enabled: */ 311 if (gEDataManager->autoMountGuestScreensEnabled(vboxGlobal().managedVMUuid())) 312 { 313 /* If host and guest have same opinion about guest-screen visibility: */ 314 if (uisession()->isScreenVisible(screenId()) == uisession()->isScreenVisibleHostDesires(screenId())) 315 display().SetVideoModeHint(screenId(), 316 uisession()->isScreenVisible(screenId()), 317 false, 0, 0, size.width(), size.height(), 0); 318 /* If host desires to have guest-screen disabled and guest-screen is enabled, retrying: */ 319 else if (!uisession()->isScreenVisibleHostDesires(screenId())) 320 display().SetVideoModeHint(screenId(), false, false, 0, 0, 0, 0, 0); 321 /* If host desires to have guest-screen enabled and guest-screen is disabled, retrying: */ 322 else if (uisession()->isScreenVisibleHostDesires(screenId())) 323 display().SetVideoModeHint(screenId(), true, false, 0, 0, size.width(), size.height(), 0); 324 } 325 /* If auto-mount of guest-screens (auto-pilot) disabled: */ 326 else 327 { 328 display().SetVideoModeHint(screenId(), 329 uisession()->isScreenVisible(screenId()), 330 false, 0, 0, size.width(), size.height(), 0); 331 } 312 332 } 313 333 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r57591 r59079 130 130 LogRel(("GUI: UIMultiScreenLayout::update: Disabling excessive guest-screen %d\n", iGuestScreen)); 131 131 display.SetVideoModeHint(iGuestScreen, false, false, 0, 0, 0, 0, 0); 132 m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, false); 132 133 } 133 134 } … … 163 164 iGuestScreen, uWidth, uHeight)); 164 165 display.SetVideoModeHint(iGuestScreen, true, false, 0, 0, uWidth, uHeight, 32); 166 m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, true); 165 167 } 166 168 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r58881 r59079 1212 1212 m_monitorVisibilityVector[0] = true; 1213 1213 } 1214 1215 /* Prepare initial screen visibility status of host-desires. 1216 * This is mostly dummy initialization as host-desires should get updated later in multi-screen layout. 1217 * By default making host-desires same as facts. */ 1218 m_monitorVisibilityVectorHostDesires.resize(machine().GetMonitorCount()); 1219 for (int iScreenIndex = 0; iScreenIndex < m_monitorVisibilityVector.size(); ++iScreenIndex) 1220 m_monitorVisibilityVectorHostDesires[iScreenIndex] = m_monitorVisibilityVector[iScreenIndex]; 1214 1221 } 1215 1222 … … 1867 1874 } 1868 1875 1876 bool UISession::isScreenVisibleHostDesires(ulong uScreenId) const 1877 { 1878 /* Make sure index feats the bounds: */ 1879 AssertReturn(uScreenId < (ulong)m_monitorVisibilityVectorHostDesires.size(), false); 1880 1881 /* Return 'actual' (host-desire) visibility status: */ 1882 return m_monitorVisibilityVectorHostDesires.value((int)uScreenId); 1883 } 1884 1885 void UISession::setScreenVisibleHostDesires(ulong uScreenId, bool fIsMonitorVisible) 1886 { 1887 /* Make sure index feats the bounds: */ 1888 AssertReturnVoid(uScreenId < (ulong)m_monitorVisibilityVectorHostDesires.size()); 1889 1890 /* Remember 'actual' (host-desire) visibility status: */ 1891 m_monitorVisibilityVectorHostDesires[(int)uScreenId] = fIsMonitorVisible; 1892 } 1893 1869 1894 bool UISession::isScreenVisible(ulong uScreenId) const 1870 1895 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r58896 r59079 222 222 void setMouseCaptured(bool fIsMouseCaptured) { m_fIsMouseCaptured = fIsMouseCaptured; } 223 223 void setMouseIntegrated(bool fIsMouseIntegrated) { m_fIsMouseIntegrated = fIsMouseIntegrated; } 224 225 /* Screen visibility status for host-desires: */ 226 bool isScreenVisibleHostDesires(ulong uScreenId) const; 227 void setScreenVisibleHostDesires(ulong uScreenId, bool fIsMonitorVisible); 224 228 225 229 /* Screen visibility status: */ … … 423 427 QVector<bool> m_monitorVisibilityVector; 424 428 429 /* Screen visibility vector for host-desires: */ 430 QVector<bool> m_monitorVisibilityVectorHostDesires; 431 425 432 /* Screen last full-screen size vector: */ 426 433 QVector<QSize> m_monitorLastFullScreenSizeVector; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r58815 r59079 454 454 { 455 455 LogRel2(("GUI: UIMachineLogicFullscreen: Host-screen available-area change ignored\n")); 456 } 457 458 void UIMachineLogicFullscreen::sltAdditionsStateChanged() 459 { 460 /* Call to base-class: */ 461 UIMachineLogic::sltAdditionsStateChanged(); 462 463 LogRel(("GUI: UIMachineLogicFullscreen: Additions-state actual-change event, rebuild multi-screen layout\n")); 464 /* Rebuild multi-screen layout: */ 465 m_pScreenLayout->rebuild(); 456 466 } 457 467 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r55401 r59079 110 110 /** Handles host-screen available-area change. */ 111 111 virtual void sltHostScreenAvailableAreaChange(); 112 /** Handles additions-state change. */ 113 virtual void sltAdditionsStateChanged(); 112 114 113 115 private: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r55697 r59079 228 228 display().GetScreenResolution(iIndex, uWidth, uHeight, uBitsPerPixel, uOriginX, uOriginY, monitorStatus); 229 229 if (!fEnabled) 230 { 230 231 display().SetVideoModeHint(iIndex, false, false, 0, 0, 0, 0, 0); 232 uisession()->setScreenVisibleHostDesires(iIndex, false); 233 } 231 234 else 232 235 { … … 237 240 uHeight = 600; 238 241 display().SetVideoModeHint(iIndex, true, false, 0, 0, uWidth, uHeight, 32); 242 uisession()->setScreenVisibleHostDesires(iIndex, true); 239 243 } 240 244 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r57591 r59079 156 156 guestScreenVisibilityStatus(), 157 157 false, 0, 0, sizeHint.width(), sizeHint.height(), 0); 158 uisession()->setScreenVisibleHostDesires(screenId(), guestScreenVisibilityStatus()); 158 159 } 159 160 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r58011 r59079 164 164 guestScreenVisibilityStatus(), 165 165 false, 0, 0, sizeHint.width(), sizeHint.height(), 0); 166 uisession()->setScreenVisibleHostDesires(screenId(), guestScreenVisibilityStatus()); 166 167 } 167 168 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r57591 r59079 207 207 } 208 208 209 void UIMachineLogicSeamless::sltAdditionsStateChanged() 210 { 211 /* Call to base-class: */ 212 UIMachineLogic::sltAdditionsStateChanged(); 213 214 LogRel(("GUI: UIMachineLogicSeamless: Additions-state actual-change event, rebuild multi-screen layout\n")); 215 /* Rebuild multi-screen layout: */ 216 m_pScreenLayout->rebuild(); 217 } 218 209 219 void UIMachineLogicSeamless::prepareActionGroups() 210 220 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
r55401 r59079 67 67 /** Handles host-screen count change. */ 68 68 virtual void sltHostScreenCountChange(); 69 /** Handles additions-state change. */ 70 virtual void sltAdditionsStateChanged(); 69 71 70 72 #ifndef RT_OS_DARWIN
Note:
See TracChangeset
for help on using the changeset viewer.