VirtualBox

Changeset 7412 in vbox


Ignore:
Timestamp:
Mar 10, 2008 3:14:36 PM (17 years ago)
Author:
vboxsync
Message:

FE/Qt4: Some Mac OS X fixes for the quartz2d framebuffer.

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

Legend:

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

    r7398 r7412  
    598598# endif
    599599    /* prepare the dock images */
    600     dockImgStatePaused    = ::DarwinCreateDockBadge ("state_paused_16px.png");
    601     dockImgStateSaving    = ::DarwinCreateDockBadge ("state_saving_16px.png");
    602     dockImgStateRestoring = ::DarwinCreateDockBadge ("state_restoring_16px.png");
    603     dockImgBack100x75     = ::DarwinCreateDockBadge ("dock_1.png");
     600    dockImgStatePaused    = ::DarwinCreateDockBadge (":/state_paused_16px.png");
     601    dockImgStateSaving    = ::DarwinCreateDockBadge (":/state_saving_16px.png");
     602    dockImgStateRestoring = ::DarwinCreateDockBadge (":/state_restoring_16px.png");
     603    dockImgBack100x75     = ::DarwinCreateDockBadge (":/dock_1.png");
    604604    SetApplicationDockTileImage (dockImgOS);
    605605#endif
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFBQuartz2D.cpp

    r7220 r7412  
    178178
    179179    /* Create the context to draw on */
    180     WindowPtr window = static_cast <WindowPtr> (mView->viewport()->handle());
    181     SetPortWindowPort (window);
    182     CGContextRef ctx;
    183     QDBeginCGContext (GetWindowPort (window), &ctx);
     180//    WindowPtr window = static_cast <WindowPtr> (mView->viewport()->handle());
     181//    SetPortWindowPort (window);
     182    CGContextRef ctx = static_cast<CGContext *> (mView->viewport()->macCGHandle());
     183//    QDBeginCGContext (GetWindowPort (window), &ctx);
    184184    /* We handle the seamless mode as a special case. */
    185185    if (static_cast <VBoxConsoleWnd*> (pMain)->isTrueSeamless())
     
    194194        /* Clear the background (Make the rect fully transparent) */
    195195        Rect winRect;
    196         GetPortBounds (GetWindowPort (window), &winRect);
     196//        GetPortBounds (GetWindowPort (window), &winRect);
    197197        CGContextClearRect (ctx, CGRectMake (winRect.left, winRect.top, winRect.right - winRect.left, winRect.bottom - winRect.top));
    198198        /* Grab the current visible region. */
     
    237237        CGImageRef subImage = CGImageCreateWithImageInRect (mImage, QRectToCGRect (is));
    238238        Assert (subImage);
     239        /* Flip the y-coord */
     240        CGContextScaleCTM (ctx, 1.0, -1.0);
     241        CGContextTranslateCTM (ctx, Q2DViewRect.x(), -Q2DViewRect.height() - Q2DViewRect.y());
    239242
    240243        /* Ok, for more performance we set a clipping path of the
    241244         * regions given by this paint event. */
    242245        Q3MemArray <QRect> a = pe->region().rects();
    243         if (a.size() > 0)
     246//        if (a.size() > 0)
     247        if (0)
    244248        {
    245249            /* Save state for display fliping */
    246250            CGContextSaveGState (ctx);
    247251            /* Flip the y-coord */
    248             CGContextScaleCTM (ctx, 1.0, -1.0);
    249             CGContextTranslateCTM (ctx, Q2DViewRect.x(), -Q2DViewRect.height() - Q2DViewRect.y());
    250252            CGContextBeginPath (ctx);
    251253            /* Add all region rects to the current context as path components */
     
    264266        CGContextDrawImage (ctx, QRectToCGRect (cr), subImage);
    265267    }
    266     QDEndCGContext (GetWindowPort (window), &ctx);
     268//    QDEndCGContext (GetWindowPort (window), &ctx);
    267269}
    268270/* Save for later shadow stuff ... */
  • trunk/src/VBox/Frontends/VirtualBox4/src/darwin/VBoxUtils-darwin.cpp

    r7282 r7412  
    2020#include "VBoxUtils.h"
    2121#include "VBoxFrameBuffer.h"
    22 #include <qimage.h>
    23 #include <qpixmap.h>
    2422
    2523#include <iprt/assert.h>
    2624#include <iprt/mem.h>
    2725
     26/* Qt includes */
     27#include <QImage>
     28#include <QPixmap>
    2829
    2930/**
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