VirtualBox

Changeset 6146 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 19, 2007 8:58:24 AM (17 years ago)
Author:
vboxsync
Message:

Fixed fullscreen mode on mac os x: 1. wasHidden is wrong (todo find out why), so perform show() instead of hide(). 2. must hide the mac os x stuff before setting the maximum size, or qt will (it seems) adjust it according to visible screen region. 3. the mask (setMask) rectangle needs to be adjusted or we'll get a one pixle border on the right and bottom of the screen (another qt bug?)

File:
1 edited

Legend:

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

    r5999 r6146  
    20232023        delete list;
    20242024
     2025#ifdef Q_WS_MAC
     2026        if (!aSeamless)
     2027        {
     2028            /* Make the apple menu bar go away before setMaximumSize! */
     2029            OSStatus orc = SetSystemUIMode (kUIModeAllHidden, kUIOptionDisableAppleMenu);
     2030            if (orc)
     2031                LogRel (("Error: Failed to change UI mode (rc=%#x) when changing to fullscreen mode. (=> menu bar trouble)\n", orc));
     2032        }
     2033#endif
     2034
    20252035        /* Adjust colors and appearance. */
    20262036        erase_color = centralWidget()->eraseColor();
     
    20342044        /* Going fullscreen */
    20352045        setWindowState (windowState() ^ WindowFullScreen);
     2046#ifdef Q_WS_MAC /* setMask seems to not include the far border pixels. */
     2047        QRect maskRect = dtw->screenGeometry (this);
     2048        maskRect.setRight(maskRect.right() + 1);
     2049        maskRect.setBottom(maskRect.bottom() + 1);
     2050        setMask (maskRect);
     2051#else
    20362052        setMask (dtw->screenGeometry (this));
    2037 
    2038 #ifdef Q_WS_MAC
    2039         if (!aSeamless)
    2040         {
    2041             /* Make the apple menu bar go away. */
    2042             OSStatus orc = SetSystemUIMode (kUIModeAllHidden,
    2043                                             kUIOptionDisableAppleMenu);
    2044             if (orc)
    2045                 LogRel (("Error: Failed to change UI mode (rc=%#x) when changing to fullscreen mode. (=> menu bar trouble)\n", orc));
    2046         }
    20472053#endif
    20482054
     
    20702076#ifdef Q_WS_MAC
    20712077        if (!aSeamless)
    2072         {
    20732078            SetSystemUIMode (kUIModeNormal, 0);
    2074         }
    20752079#endif
    20762080
     
    20962100    }
    20972101
     2102#ifdef Q_WS_MAC /* wasHidden is wrong on the mac it seems. */
     2103    /** @todo figure out what is really wrong here... */
     2104    if (!wasHidden)
     2105        show();
     2106#else
    20982107    if (wasHidden)
    20992108        hide();
    2100 
     2109#endif
    21012110    return true;
    21022111}
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