Changeset 50536 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 21, 2014 7:31:53 AM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r50535 r50536 35 35 UIMachineLogicFullscreen::UIMachineLogicFullscreen(QObject *pParent, UISession *pSession) 36 36 : UIMachineLogic(pParent, pSession, UIVisualStateType_Fullscreen) 37 #ifdef Q_WS_MAC 38 , m_fIsFullscreenInvalidated(false) 39 #endif /* Q_WS_MAC */ 37 40 { 38 41 /* Create multiscreen layout: */ … … 137 140 else 138 141 { 139 /* Change visual-state to requested: */ 140 LogRel(("UIMachineLogicFullscreen::sltHandleNativeFullscreenDidExit: " 141 "Machine-window(s) exited fullscreen, changing visual-state to requested...\n")); 142 UIVisualStateType type = uisession()->requestedVisualState(); 143 if (type == UIVisualStateType_Invalid) 144 type = UIVisualStateType_Normal; 145 uisession()->setRequestedVisualState(UIVisualStateType_Invalid); 146 uisession()->changeVisualState(type); 142 /* If fullscreen mode was just invalidated: */ 143 if (m_fIsFullscreenInvalidated) 144 { 145 /* Mark fullscreen mode valid again and re-enter it: */ 146 LogRel(("UIMachineLogicFullscreen::sltHandleNativeFullscreenDidExit: " 147 "Machine-window(s) exited invalidated fullscreen, enter again...\n")); 148 m_fIsFullscreenInvalidated = false; 149 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 150 pMachineWindow->showInNecessaryMode(); 151 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 152 if ( (darwinScreensHaveSeparateSpaces() || pMachineWindow->screenId() == 0) 153 && !darwinIsInFullscreenMode(pMachineWindow)) 154 darwinToggleFullscreenMode(pMachineWindow); 155 } 156 /* If fullscreen mode was manually exited: */ 157 else 158 { 159 /* Change visual-state to requested: */ 160 LogRel(("UIMachineLogicFullscreen::sltHandleNativeFullscreenDidExit: " 161 "Machine-window(s) exited fullscreen, changing visual-state to requested...\n")); 162 UIVisualStateType type = uisession()->requestedVisualState(); 163 if (type == UIVisualStateType_Invalid) 164 type = UIVisualStateType_Normal; 165 uisession()->setRequestedVisualState(UIVisualStateType_Invalid); 166 uisession()->changeVisualState(type); 167 } 147 168 } 148 169 } … … 231 252 void UIMachineLogicFullscreen::sltScreenLayoutChanged() 232 253 { 254 #ifdef Q_WS_MAC 255 /* For Lion and previous: */ 256 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 257 { 258 /* Update machine-window(s) location/size: */ 259 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 260 pMachineWindow->showInNecessaryMode(); 261 /* Update 'presentation mode': */ 262 setPresentationModeEnabled(true); 263 } 264 /* For ML and next: */ 265 else 266 { 267 /* Invalidate and exit fullscreen mode: */ 268 m_fIsFullscreenInvalidated = true; 269 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 270 if (darwinIsInFullscreenMode(pMachineWindow)) 271 darwinToggleFullscreenMode(pMachineWindow); 272 } 273 #else /* !Q_WS_MAC */ 233 274 /* Update machine-window(s) location/size: */ 234 275 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 235 276 pMachineWindow->showInNecessaryMode(); 236 237 #ifdef Q_WS_MAC 238 /* Update 'presentation mode' for Lion and previous: */ 239 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 240 setPresentationModeEnabled(true); 241 #endif /* Q_WS_MAC */ 277 #endif /* !Q_WS_MAC */ 242 278 } 243 279 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r50535 r50536 103 103 /** Mac OS X: Contains machine-window(s) marked as 'fullscreen'. */ 104 104 QSet<UIMachineWindow*> m_fullscreenMachineWindows; 105 /** Mac OS X: Holds 'fullscreen' mode invalidation status. */ 106 bool m_fIsFullscreenInvalidated; 105 107 #endif /* Q_WS_MAC */ 106 108
Note:
See TracChangeset
for help on using the changeset viewer.