VirtualBox

Changeset 5643 in vbox


Ignore:
Timestamp:
Nov 8, 2007 3:40:18 PM (17 years ago)
Author:
vboxsync
Message:

Fixing some issues in fullscreen/seamless mode switch for KDE and Win.

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

Legend:

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

    r5544 r5643  
    846846    /* Make no normalizeGeometry in case we are in manual resize
    847847     * mode or main window is maximized */
    848     if (mainwnd->isMaximized())
     848    if (mainwnd->isMaximized() || mainwnd->isFullScreen())
    849849        return;
    850850
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r5544 r5643  
    10091009    vmSeamlessAction->setEnabled (mIsSeamless);
    10101010    vmFullscreenAction->setEnabled (mIsFullscreen);
     1011
     1012    console->updateGeometry();
    10111013}
    10121014
     
    19901992
    19911993        /* Memorize the maximized state. */
    1992         was_max = isMaximized();
     1994        QDesktopWidget *dtw = QApplication::desktop();
     1995        was_max = isMaximized() &&
     1996                  dtw->availableGeometry().width()  == frameSize().width() &&
     1997                  dtw->availableGeometry().height() == frameSize().height();
    19931998
    19941999        /* Save the previous scroll-view minimum size before entering
     
    20012006        /* let the widget take the whole available desktop space */
    20022007        QRect scrGeo = aSeamless ?
    2003             QApplication::desktop()->availableGeometry (this) :
    2004             QApplication::desktop()->screenGeometry (this);
     2008            dtw->availableGeometry (this) : dtw->screenGeometry (this);
    20052009
    20062010        /* Calculate the difference region between current mode
    20072011         * (fullscreen or seamless) and the screen geometry. */
    20082012        mStrictedRegion =
    2009             QRegion (QApplication::desktop()->screenGeometry (this)) - scrGeo;
     2013            QRegion (dtw->screenGeometry (this)) - scrGeo;
    20102014
    20112015        /* Setup the shifting spacer to make the console to be aligned on top
     
    20432047        console->setHScrollBarMode (QScrollView::AlwaysOff);
    20442048
    2045         /* Going fullscreen:
    2046          * "normal -> fullscreen" for normal window,
    2047          * "maximized -> normal -> fullscreen" for maximized window.
    2048          * Going "maximized -> fullscreen" wrong on KDE in both directions.
    2049          * Here it does not resize the child window correctly. */
    2050         if (was_max)
    2051             showNormal();
    2052         showFullScreen();
     2049        /* Going fullscreen */
     2050        setWindowState (windowState() ^ WindowFullScreen);
    20532051
    20542052#ifdef Q_WS_MAC
     
    21052103        hidden_children.clear();
    21062104
    2107         /* Going normal || maximized:
    2108          * "fullscreen -> normal" if was normal window,
    2109          * "fullscreen -> normal -> maximized" if was maximized window.
    2110          * Going "fullscreen -> maximized" wrong on KDE in both directions.
    2111          * Here it looses the window frame totally. */
    2112         showNormal();
    2113         if (was_max)
    2114             showMaximized();
     2105        /* Going normal || maximized */
     2106        setWindowState (windowState() ^ WindowFullScreen);
    21152107
    21162108        qApp->processEvents();
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