VirtualBox

Changeset 6442 in vbox


Ignore:
Timestamp:
Jan 22, 2008 1:57:50 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27417
Message:

Mac OS X: Added a fading effect if the vm window is going fullscreen. This is like in other fullscreen applications like keynote or powerpoint on the mac.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h

    r6441 r6442  
    331331    CGImageRef dockImgBack100x75;
    332332    CGImageRef dockImgOS;
     333    /* For the fade effect if the the window goes fullscreen */
     334    CGDisplayFadeReservationToken mFadeToken;
    333335#endif
    334336};
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r6441 r6442  
    10131013    setViewInSeamlessMode(QRect(console->mapToGlobal(QPoint(0, 0)), console->size()));
    10141014#endif
     1015#ifdef Q_WS_MAC
     1016    if(!mIsSeamless)
     1017    {
     1018      /* Fade back to the normal gamma */
     1019      CGDisplayFade(mFadeToken, 0.5, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0.0, 0.0, 0.0, false);
     1020      CGReleaseDisplayFadeReservation(mFadeToken);
     1021    }
     1022#endif
    10151023
    10161024    vmSeamlessAction->setEnabled (mIsSeamless);
     
    10251033{
    10261034    disconnect (console, SIGNAL (resizeHintDone()), 0, 0);
     1035#ifdef Q_WS_MAC
     1036    if(!mIsSeamless)
     1037    {
     1038      /* Fade back to the normal gamma */
     1039      CGDisplayFade(mFadeToken, 0.5, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0.0, 0.0, 0.0, false);
     1040      CGReleaseDisplayFadeReservation(mFadeToken);
     1041    }
     1042#endif
    10271043
    10281044    vmSeamlessAction->setEnabled (mIsSeamlessSupported);
     
    19121928bool VBoxConsoleWnd::toggleFullscreenMode (bool aOn, bool aSeamless)
    19131929{
     1930#ifdef Q_WS_MAC
     1931    if (!aSeamless)
     1932    {
     1933      /* Fade to black */
     1934      CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &mFadeToken);
     1935      CGDisplayFade(mFadeToken, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0.0, 0.0, 0.0, true);
     1936    }
     1937#endif
    19141938
    19151939    if (aSeamless)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette