- Timestamp:
- Jun 6, 2012 1:42:33 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r41591 r41598 167 167 /* Ignore KGuestMonitorChangedEventType_NewOrigin change event: */ 168 168 if (changeType == KGuestMonitorChangedEventType_NewOrigin) 169 return; 170 /* Ignore KGuestMonitorChangedEventType_Disabled event if there is only one window visible: */ 171 AssertMsg(uisession()->countOfVisibleWindows() > 0, ("All machine windows are hidden!")); 172 if ((changeType == KGuestMonitorChangedEventType_Disabled) && 173 (uisession()->countOfVisibleWindows() == 1)) 169 174 return; 170 175 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r41591 r41598 692 692 m_monitorVisibilityVector[i] = fEnabled; 693 693 } 694 /* And make sure at least one of them is visible (primary if others are hidden): */ 695 if (countOfVisibleWindows() < 1) 696 m_monitorVisibilityVector[0] = true; 694 697 } 695 698 } … … 1126 1129 } 1127 1130 1131 int UISession::countOfVisibleWindows() 1132 { 1133 int cCountOfVisibleWindows = 0; 1134 for (int i = 0; i < m_monitorVisibilityVector.size(); ++i) 1135 if (m_monitorVisibilityVector[i]) 1136 ++cCountOfVisibleWindows; 1137 return cCountOfVisibleWindows; 1138 } 1139 1128 1140 UIFrameBuffer* UISession::frameBuffer(ulong uScreenId) const 1129 1141 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r41587 r41598 154 154 bool isScreenVisible(ulong uScreenId) const; 155 155 void setScreenVisible(ulong uScreenId, bool fIsMonitorVisible); 156 int countOfVisibleWindows(); 156 157 157 158 /* Returns existing framebuffer for the given screen-number;
Note:
See TracChangeset
for help on using the changeset viewer.