VirtualBox

Changeset 48686 in vbox for trunk


Ignore:
Timestamp:
Sep 25, 2013 2:35:43 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 6965: MacOS X host: VirtualBox Manager geometry restoring issue: Trying to fix.

File:
1 edited

Legend:

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

    r48684 r48686  
    978978        case QEvent::Resize:
    979979        {
    980             QResizeEvent *pResizeEvent = (QResizeEvent*) pEvent;
    981             if ((windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | Qt::WindowFullScreen)) == 0)
     980            if (isVisible() && (windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | Qt::WindowFullScreen)) == 0)
     981            {
     982                QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);
    982983                m_normalGeo.setSize(pResizeEvent->size());
     984            }
    983985            break;
    984986        }
    985987        case QEvent::Move:
    986988        {
    987             if ((windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | Qt::WindowFullScreen)) == 0)
     989            if (isVisible() && (windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | Qt::WindowFullScreen)) == 0)
     990            {
     991#ifdef Q_WS_MAC
     992                QMoveEvent *pMoveEvent = static_cast<QMoveEvent*>(pEvent);
     993                m_normalGeo.moveTo(pMoveEvent->pos());
     994#else /* Q_WS_MAC */
    988995                m_normalGeo.moveTo(geometry().x(), geometry().y());
     996#endif /* !Q_WS_MAC */
     997            }
    989998            break;
    990999        }
     
    15241533            move(m_normalGeo.topLeft());
    15251534            resize(m_normalGeo.size());
    1526             m_normalGeo = normalGeometry();
    15271535#else /* Q_WS_MAC */
    15281536            setGeometry(m_normalGeo);
     
    15741582    /* Save window position: */
    15751583    {
    1576 #ifdef Q_WS_MAC
    1577         QRect frameGeo = frameGeometry();
    1578         QRect save(frameGeo.x(), frameGeo.y(), m_normalGeo.width(), m_normalGeo.height());
    1579 #else /* Q_WS_MAC */
    15801584        QRect save(m_normalGeo);
    1581 #endif /* !Q_WS_MAC */
    1582         LogRelFlow(("UISelectorWindow: Saving geometry as: %dx%d @ %dx%d.\n",
     1585        LogRelFlow(("UISelectorWindow: Saving geometry as %dx%d @ %dx%d.\n",
    15831586                    save.x(), save.y(), save.width(), save.height()));
    15841587        QString strWinPos = QString("%1,%2,%3,%4").arg(save.x()).arg(save.y()).arg(save.width()).arg(save.height());
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