Changeset 7918 in vbox
- Timestamp:
- Apr 11, 2008 1:48:38 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
r7680 r7918 189 189 void exitSeamless(); 190 190 191 void switchToFullscreen (bool aOn, bool aSeamless); 191 192 void setViewInSeamlessMode (const QRect &aTargetRect); 192 193 … … 338 339 339 340 #ifdef Q_WS_MAC 340 // Dock images. 341 /* For seamless maximizing */ 342 QRect mNormalGeometry; 343 Qt::WindowFlags mSavedFlags; 344 /* Dock images */ 341 345 CGImageRef dockImgStatePaused; 342 346 CGImageRef dockImgStateSaving; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r7871 r7918 2103 2103 } 2104 2104 2105 #ifdef Q_WS_MAC2106 if (!aSeamless)2107 {2108 /* Make the apple menu bar go away before setMaximumSize! */2109 OSStatus orc = SetSystemUIMode (kUIModeAllHidden, kUIOptionDisableAppleMenu);2110 if (orc)2111 LogRel (("Error: Failed to change UI mode (rc=%#x) when changing to fullscreen mode. (=> menu bar trouble)\n", orc));2112 }2113 #endif2114 2115 2105 /* Adjust colors and appearance. */ 2116 2106 mErasePalette = centralWidget()->palette(); … … 2126 2116 2127 2117 /* Going fullscreen */ 2128 s etWindowState (windowState() ^ Qt::WindowFullScreen);2118 switchToFullscreen (aOn, aSeamless); 2129 2119 #ifdef Q_WS_MAC /* setMask seems to not include the far border pixels. */ 2130 2120 // QRect maskRect = dtw->screenGeometry (this); … … 2231 2221 2232 2222 /* Going normal || maximized */ 2233 s etWindowState (windowState() ^ Qt::WindowFullScreen);2223 switchToFullscreen (aOn, aSeamless); 2234 2224 2235 2225 qApp->processEvents(); … … 2267 2257 // Private slots 2268 2258 ///////////////////////////////////////////////////////////////////////////// 2259 void VBoxConsoleWnd::switchToFullscreen (bool aOn, bool aSeamless) 2260 { 2261 #ifdef Q_WS_MAC 2262 if (aSeamless) 2263 if (aOn) 2264 { 2265 /* Save for later restoring */ 2266 mNormalGeometry = geometry(); 2267 mSavedFlags = windowFlags(); 2268 /* Remove the frame from the window */ 2269 setParent (0, Qt::Window | Qt::FramelessWindowHint | (windowFlags() & 0xffff0000)); 2270 /* Set it maximized */ 2271 setWindowState (windowState() ^ Qt::WindowMaximized); 2272 } 2273 else 2274 { 2275 /* Restore old values */ 2276 setParent (0, mSavedFlags); 2277 setGeometry (mNormalGeometry); 2278 } 2279 else 2280 /* Here we are going really fullscreen */ 2281 setWindowState (windowState() ^ Qt::WindowFullScreen); 2282 #else 2283 NOREF (aOn); 2284 NOREF (aSeamless); 2285 setWindowState (windowState() ^ Qt::WindowFullScreen); 2286 #endif 2287 } 2288 2269 2289 void VBoxConsoleWnd::setViewInSeamlessMode (const QRect &aTargetRect) 2270 2290 { 2291 #ifndef Q_WS_MAC 2271 2292 if (mIsSeamless) 2272 2293 { … … 2290 2311 QSizePolicy::Preferred, QSizePolicy::Fixed); 2291 2312 } 2313 #else // !Q_WS_MAC 2314 NOREF (aTargetRect); 2315 #endif // !Q_WS_MAC 2292 2316 } 2293 2317
Note:
See TracChangeset
for help on using the changeset viewer.