VirtualBox

Changeset 27025 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 4, 2010 1:47:10 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: new core: more Mac related fixes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r27020 r27025  
    132132#endif
    133133
     134#ifdef Q_WS_MAC
     135bool UIMachineWindowSeamless::event(QEvent *pEvent)
     136{
     137    switch (pEvent->type())
     138    {
     139        case QEvent::Paint:
     140        {
     141            /* Clear the background */
     142            CGContextClearRect(::darwinToCGContextRef(this), ::darwinToCGRect(frameGeometry()));
     143            break;
     144        }
     145        default:
     146            break;
     147    }
     148    return QIMainDialog::event(pEvent);
     149}
     150#endif /* Q_WS_MAC */
     151
    134152void UIMachineWindowSeamless::closeEvent(QCloseEvent *pEvent)
    135153{
     
    146164    move(geometry.topLeft());
    147165    resize(geometry.size());
     166
     167#ifdef Q_WS_MAC
     168    /* Please note: All the stuff below has to be done after the window has
     169     * switched to fullscreen. Qt changes the winId on the fullscreen
     170     * switch and make this stuff useless with the old winId. So please be
     171     * careful on rearrangement of the method calls. */
     172    ::darwinSetShowsWindowTransparent(this, true);
     173#endif
     174
    148175    /* Perform these events: */
    149176    qApp->processEvents();
     177
    150178}
    151179
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h

    r27012 r27025  
    5858#ifdef Q_WS_X11
    5959    bool x11Event(XEvent *pEvent);
    60 #endif
     60#endif /* Q_WS_X11 */
    6161    void closeEvent(QCloseEvent *pEvent);
     62#ifdef Q_WS_MAC
     63    bool event(QEvent *pEvent);
     64#endif /* Q_WS_MAC */
    6265
    6366    /* Prepare helpers: */
     
    6568#ifdef Q_WS_MAC
    6669    void prepareMenu();
    67 #endif
     70#endif /* Q_WS_MAC */
    6871    void prepareMachineView();
    6972#ifdef Q_WS_MAC
    7073    void loadWindowSettings();
    71 #endif
     74#endif /* Q_WS_MAC */
    7275
    7376    /* Cleanup helpers: */
    7477#ifdef Q_WS_MAC
    7578    //void saveWindowSettings() {}
    76 #endif
     79#endif /* Q_WS_MAC */
    7780    void cleanupMachineView();
    7881#ifdef Q_WS_MAC
    7982    //void cleanupMenu() {}
    80 #endif
     83#endif /* Q_WS_MAC */
    8184    //void cleanupSeamless() {}
    8285
     
    8891#ifdef Q_WS_WIN
    8992    QRegion m_prevRegion;
    90 #endif
     93#endif /* Q_WS_WIN */
    9194
    9295    /* Factory support: */
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