VirtualBox

Changeset 15467 in vbox


Ignore:
Timestamp:
Dec 14, 2008 3:44:59 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40921
Message:

FE/Qt4-OSX: Fixed position/size of the VM window after a VM snapshot is
restored which was in seamless mode on save (#3306).

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
3 edited

Legend:

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

    r15185 r15467  
    7474    void refreshView();
    7575
     76    bool isWindowMaximized() const
     77    {
     78#ifdef Q_WS_MAC
     79        /* On Mac OS X we didn't really jump to the fullscreen mode but
     80         * maximize the window. This situation has to be considered when
     81         * checking for maximized or fullscreen mode. */
     82        return !(isTrueSeamless()) && QMainWindow::isMaximized();
     83#else /* Q_WS_MAC */
     84        return QMainWindow::isMaximized();
     85#endif /* Q_WS_MAC */
     86    }
     87    bool isWindowFullScreen() const
     88    {
     89#ifdef Q_WS_MAC
     90        /* On Mac OS X we didn't really jump to the fullscreen mode but
     91         * maximize the window. This situation has to be considered when
     92         * checking for maximized or fullscreen mode. */
     93        return isTrueFullscreen() || isTrueSeamless();
     94#else /* Q_WS_MAC */
     95        return QMainWindow::isFullscreen();
     96#endif /* Q_WS_MAC */
     97    }
     98
    7699    bool isTrueFullscreen() const { return mIsFullscreen; }
    77100
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r15164 r15467  
    947947    /* Make no normalizeGeometry in case we are in manual resize
    948948     * mode or main window is maximized */
    949     if (mMainWnd->isMaximized() || mMainWnd->isFullScreen())
     949    if (mMainWnd->isWindowMaximized() || mMainWnd->isWindowFullScreen())
    950950        return;
    951951
     
    23742374{
    23752375    if ((mGuestSupportsGraphics && mAutoresizeGuest) ||
     2376        mMainWnd->isTrueSeamless() ||
    23762377        mMainWnd->isTrueFullscreen())
    23772378    {
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r15391 r15467  
    12351235            QResizeEvent *re = (QResizeEvent *) e;
    12361236
    1237             if (!mIsWaitingModeResize && !isMaximized() &&
     1237            if (!mIsWaitingModeResize && !isWindowMaximized() &&
    12381238                !isTrueFullscreen() && !isTrueSeamless())
    12391239            {
     
    12561256        case QEvent::Move:
    12571257        {
    1258             if (!isMaximized() && !isTrueFullscreen() && !isTrueSeamless())
     1258            if (!isWindowMaximized() && !isTrueFullscreen() && !isTrueSeamless())
    12591259            {
    12601260                mNormalGeo.moveTo (geometry().x(), geometry().y());
     
    15511551            .arg (mNormalGeo.x()).arg (mNormalGeo.y())
    15521552            .arg (mNormalGeo.width()).arg (mNormalGeo.height());
    1553         if (isMaximized() || (mIsFullscreen && was_max)
     1553        if (isWindowMaximized() || (mIsFullscreen && was_max)
    15541554                          || (mIsSeamless && was_max))
    15551555            winPos += QString (",%1").arg (VBoxDefs::GUI_LastWindowPosition_Max);
     
    21442144{
    21452145    /* Please note: For some platforms like the Mac, the calling order of the
    2146      * functions in this methods is vital. So please be carefull on changing
     2146     * functions in this methods is vital. So please be careful on changing
    21472147     * this. */
    21482148
     
    22642264        /* Memorize the maximized state. */
    22652265        QDesktopWidget *dtw = QApplication::desktop();
    2266         was_max = isMaximized() &&
     2266        was_max = isWindowMaximized() &&
    22672267                  dtw->availableGeometry().width()  == frameSize().width() &&
    22682268                  dtw->availableGeometry().height() == frameSize().height();
     
    23382338             * window switch back to normal size. Qt changes the winId on the
    23392339             * fullscreen switch and make this stuff useless with the old
    2340              * winId. So please be carefull on rearrangement of the method
     2340             * winId. So please be careful on rearrangement of the method
    23412341             * calls. */
    23422342            /* Undo all mac specific installations */
     
    23832383         * switched to fullscreen. Qt changes the winId on the fullscreen
    23842384         * switch and make this stuff useless with the old winId. So please be
    2385          * carefull on rearrangement of the method calls. */
     2385         * careful on rearrangement of the method calls. */
    23862386        OSStatus status;
    23872387        HIViewRef viewRef = ::darwinToHIViewRef (console->viewport());
     
    24232423#endif
    24242424
     2425    /* Send guest size hint */
     2426    console->toggleFSMode (consoleSize);
     2427
    24252428    /* Process all console attributes changes and sub-widget hidings */
    24262429    qApp->processEvents();
    2427 
    2428     /* Send guest size hint */
    2429     console->toggleFSMode (consoleSize);
    24302430
    24312431    if (!mIsWaitingModeResize)
     
    25842584    if (console)
    25852585    {
    2586         if (isMaximized())
     2586        if (isWindowMaximized())
    25872587            showNormal();
    25882588        console->normalizeGeometry (true /* adjustPosition */);
     
    29922992        HIViewReshapeStructure (::darwinToHIViewRef (console->viewport()));
    29932993//        HIWindowInvalidateShadow (::darwinToWindowRef (console->viewport()));
    2994 //        ReshapeCustomWindow (mapToWindowRef (this));
     2994//        ReshapeCustomWindow (::darwinToWindowRef (this));
    29952995    }
    29962996    else
Note: See TracChangeset for help on using the changeset viewer.

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