Changeset 52299 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 6, 2014 4:56:26 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r52275 r52299 42 42 , m_pPopupMenu(0) 43 43 #ifdef Q_WS_MAC 44 , m_f adeToken(kCGDisplayFadeReservationInvalidToken)44 , m_fScreensHaveSeparateSpaces(darwinScreensHaveSeparateSpaces()) 45 45 #endif /* Q_WS_MAC */ 46 46 { … … 144 144 && hasHostScreenForGuestScreen(pMachineWindow->screenId())) 145 145 visibleMachineWindows << pMachineWindow; 146 if ( ! darwinScreensHaveSeparateSpaces()146 if ( !screensHaveSeparateSpaces() 147 147 || m_fullscreenMachineWindows == visibleMachineWindows) 148 148 fadeToNormal(); … … 722 722 723 723 /* Validate window which can't be fullscreen: */ 724 if (uScreenID != 0 && ! darwinScreensHaveSeparateSpaces())724 if (uScreenID != 0 && !screensHaveSeparateSpaces()) 725 725 { 726 726 LogRel(("UIMachineLogicFullscreen::revalidateNativeFullScreen: " -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r52298 r52299 36 36 #ifdef RT_OS_DARWIN 37 37 signals: 38 38 39 /** Mac OS X: Notifies listeners about native fullscreen mode should be entered on @a pMachineWindow. */ 39 40 void sigNotifyAboutNativeFullscreenShouldBeEntered(UIMachineWindow *pMachineWindow = 0); … … 41 42 void sigNotifyAboutNativeFullscreenShouldBeExited(UIMachineWindow *pMachineWindow = 0); 42 43 #endif /* RT_OS_DARWIN */ 44 45 #ifdef Q_WS_MAC 46 public: 47 48 /** Returns whether screens have separate spaces. */ 49 bool screensHaveSeparateSpaces() const { return m_fScreensHaveSeparateSpaces; } 50 #endif /* Q_WS_MAC */ 43 51 44 52 protected: … … 90 98 void sltInvokePopupMenu(); 91 99 92 #ifdef Q_WS_MAC100 #ifdef RT_OS_DARWIN 93 101 void sltChangePresentationMode(bool fEnabled); 94 #endif /* Q_WS_MAC*/102 #endif /* RT_OS_DARWIN */ 95 103 96 104 /** Updates machine-window(s) location/size on screen-layout changes. */ … … 145 153 146 154 #ifdef Q_WS_MAC 155 /** Mac OS X: Holds whether screens have separate spaces. */ 156 const bool m_fScreensHaveSeparateSpaces; 157 147 158 /** Mac OS X: Fade token. */ 148 159 CGDisplayFadeReservationToken m_fadeToken; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r52202 r52299 129 129 /* Make sure this window has fullscreen logic: */ 130 130 UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic()); 131 if (!pFullscreenLogic) 132 return; 131 AssertPtrReturnVoid(pFullscreenLogic); 133 132 134 133 /* Make sure this window mapped to some host-screen: */ … … 140 139 141 140 /* Enter native fullscreen mode if necessary: */ 142 if ( ( darwinScreensHaveSeparateSpaces() || m_uScreenId == 0)141 if ( (pFullscreenLogic->screensHaveSeparateSpaces() || m_uScreenId == 0) 143 142 && !darwinIsInFullscreenMode(this)) 144 143 darwinToggleFullscreenMode(this); … … 154 153 return; 155 154 155 /* Make sure this window has fullscreen logic: */ 156 UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic()); 157 AssertPtrReturnVoid(pFullscreenLogic); 158 156 159 /* Mark window 'transitioned from fullscreen': */ 157 160 m_fIsInFullscreenTransition = true; 158 161 159 162 /* Exit native fullscreen mode if necessary: */ 160 if ( ( darwinScreensHaveSeparateSpaces() || m_uScreenId == 0)163 if ( (pFullscreenLogic->screensHaveSeparateSpaces() || m_uScreenId == 0) 161 164 && darwinIsInFullscreenMode(this)) 162 165 darwinToggleFullscreenMode(this); … … 189 192 if (vboxGlobal().osRelease() > MacOSXRelease_Lion) 190 193 { 194 /* Make sure this window has fullscreen logic: */ 195 UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic()); 196 AssertPtrReturnVoid(pFullscreenLogic); 191 197 /* Enable fullscreen support for every screen which requires it: */ 192 if ( darwinScreensHaveSeparateSpaces() || m_uScreenId == 0)198 if (pFullscreenLogic->screensHaveSeparateSpaces() || m_uScreenId == 0) 193 199 darwinEnableFullscreenSupport(this); 194 200 /* Enable transience support for other screens: */ … … 276 282 move(workingArea.topLeft()); 277 283 #ifdef Q_WS_MAC 284 /* Make sure this window has fullscreen logic: */ 285 UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic()); 286 AssertPtrReturnVoid(pFullscreenLogic); 278 287 /* Resize to the appropriate size on Lion and previous: */ 279 288 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) … … 281 290 /* Resize to the appropriate size on ML and next 282 291 * only if that screen has no own user-space: */ 283 else if (! darwinScreensHaveSeparateSpaces() && m_uScreenId != 0)292 else if (!pFullscreenLogic->screensHaveSeparateSpaces() && m_uScreenId != 0) 284 293 resize(workingArea.size()); 285 294 #else /* !Q_WS_MAC */
Note:
See TracChangeset
for help on using the changeset viewer.